-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Event indicator is sometimes not displayed. #340
Comments
Hi @KatrinLomp . Can u try the latest? |
I'm still able to reproduce it. |
Can u make a demo and share it. |
I created demo project here: https://github.com/KatrinLomp/EventIndicatorDemo |
Thanks @KatrinLomp I'll check asap |
Check again? |
Haven't been able to reproduce with latest code. Thank you for the fix! |
When navigating between months, I sometimes don't see indicator on dates that should have events. I tried this on versions 2.2.0 and 2.1.1. With 2.1.1 I see indicator, but the color is not what I return in calendar:appearance:eventColorsForDate:. With 2.2.0 I don't see any indicator (maybe clear color is used?).
I tried to get an example to reproduce the problem. This is the setup, that currently reproduces the problem for me:
(NSInteger)calendar:(FSCalendar *)calendar numberOfEventsForDate:(NSDate *)date {
NSCalendar *gregorian = [[NSCalendar alloc] initWithCalendarIdentifier:NSCalendarIdentifierGregorian];
NSDateComponents *comp = [gregorian components:(NSCalendarUnitYear | NSCalendarUnitMonth | NSCalendarUnitDay) fromDate:date];
if ((comp.year == 2016 && comp.month == 05 && comp.day == 26)
|| (comp.year == 2016 && comp.month == 06 && comp.day == 01)
|| (comp.year == 2016 && comp.month == 06 && comp.day == 23)
|| (comp.year == 2016 && comp.month == 06 && comp.day == 24)
|| (comp.year == 2016 && comp.month == 06 && comp.day == 25)
|| (comp.year == 2016 && comp.month == 07 && comp.day == 01)
|| (comp.year == 2016 && comp.month == 07 && comp.day == 07)
|| (comp.year == 2016 && comp.month == 07 && comp.day == 18)) {
return 1;
}
return 0;
}
(NSArray *)calendar:(FSCalendar *)calendar appearance:(FSCalendarAppearance *)appearance eventColorsForDate:(NSDate *)date {
return @[[UIColor yellowColor]];
}
I just switch between these months and sometimes indicator goes missing. I don't know if this matters, but I have a small delay before I load events for new month. I prepare events for new month while calendar animates from one month to another and once it's done animating, I reload calendar.
The text was updated successfully, but these errors were encountered: