Fix an equal-check problem

This commit is contained in:
Wenchao Ding 2016-12-16 21:48:55 +08:00
parent ea246986ec
commit 44deb994d8
1 changed files with 2 additions and 5 deletions

View File

@ -787,14 +787,11 @@ typedef NS_ENUM(NSUInteger, FSCalendarOrientation) {
_today = nil;
} else {
FSCalendarAssertDateInBounds(today,self.gregorian,self.minimumDate,self.maximumDate);
if (![self.gregorian isDateInToday:today]) {
_today = [self.gregorian dateBySettingHour:0 minute:0 second:0 ofDate:today options:0];
[self setNeedsLayout];
}
_today = [self.gregorian dateBySettingHour:0 minute:0 second:0 ofDate:today options:0];
}
if (self.hasValidateVisibleLayout) {
[_collectionView.visibleCells makeObjectsPerformSelector:@selector(setDateIsToday:) withObject:@NO];
[[_collectionView cellForItemAtIndexPath:[self.calculator indexPathForDate:today]] setValue:@YES forKey:@"dateIsToday"];
if (today) [[_collectionView cellForItemAtIndexPath:[self.calculator indexPathForDate:today]] setValue:@YES forKey:@"dateIsToday"];
[_collectionView.visibleCells makeObjectsPerformSelector:@selector(configureAppearance)];
}
}