You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
How can i achieve multiple dates selection in this API.
My requirement is when user selects two dates then i have to change the date cells color in b/w these 2 selected dates.
can i achieve my requirement using this API.
The text was updated successfully, but these errors were encountered:
int main() {
int selectedDates[NUM_DATES] = {0}; // Initialize an array to track selected dates
int startDate, endDate;
// Simulate user selecting two dates (for example, 5th and 15th)
startDate = 5;
endDate = 15;
// Mark selected dates in the array
for (int i = startDate; i <= endDate; i++) {
selectedDates[i] = 1;
}
// Display date cells and change colors based on selection
for (int i = 1; i <= NUM_DATES; i++) {
if (selectedDates[i] == 1) {
printf("\x1b[31m"); // Change text color to red (you can customize this)
}
printf("%2d ", i);
if (selectedDates[i] == 1) {
printf("\x1b[0m"); // Reset text color to default
}
}
return 0;
How can i achieve multiple dates selection in this API.
My requirement is when user selects two dates then i have to change the date cells color in b/w these 2 selected dates.
can i achieve my requirement using this API.
The text was updated successfully, but these errors were encountered: