WenchaoD / FSCalendar

A fully customizable iOS calendar library, compatible with Objective-C and Swift

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

The last month's titlePlaceholderColor color is wrong

taojeff opened this issue · comments

After implementing the start date and end date of the calendar by proxy, and setting the titlePlaceholderColor and subtitlePlaceholderColor properties of appearance, I found that when I swipe to the month with the largest date, titlePlaceholderColor, subtitlePlaceholderColor Only the color number 1 is valid. All others are invalid. The same is true after looking at the custom style code
_calendar.appearance.titlePlaceholderColor = UIColor.redColor; _calendar.appearance.subtitlePlaceholderColor = UIColor.redColor;
`- (NSDate *)minimumDateForCalendar:(FSCalendar *)calendar
{
NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
dateFormatter.dateFormat = @"yyyy-MM-dd";
return [dateFormatter dateFromString:@"2024-01-01"];
}

  • (NSDate *)maximumDateForCalendar:(FSCalendar *)calendar
    {
    NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
    dateFormatter.dateFormat = @"yyyy-MM-dd";
    return [self.gregorian dateByAddingUnit:NSCalendarUnitYear value:1 toDate:[dateFormatter dateFromString:@"2024-01-01"] options:0];
    }
    `
    6e95d24c91643fdfbbcc88b95c0e3638