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.
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.