After exploring more detail in code in FSCalendar, I figure that you can do it. But it's mean you have to make some changes for the library.
First in FSCalendarExtension
,
- (nullable NSDate *)fs_firstDayOfMonth:(NSDate *)month
{
if (!month) return nil;
NSDateComponents *components = [self components:NSCalendarUnitYear|NSCalendarUnitMonth|NSCalendarUnitDay|NSCalendarUnitHour fromDate:month];
components.day = today;
return [self dateFromComponents:components];
}
This will get the first day of the month, you have to set it back to the current date. As well as modified all the following functions :
- (nullable NSDate *)fs_firstDayOfWeek:(NSDate *)week
- (nullable NSDate *)fs_lastDayOfWeek:(NSDate *)week
- (NSInteger)fs_numberOfDaysInMonth:(NSDate *)month
I mean that's a lot of changes. And you have to change code for library, A better way for you is creating your own calendar. It would be better.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…