Fix an equal-check problem
This commit is contained in:
parent
ea246986ec
commit
44deb994d8
|
|
@ -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)];
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue