Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The last month's titlePlaceholderColor color is wrong #1427

Open
taojeff opened this issue Mar 13, 2024 · 0 comments
Open

The last month's titlePlaceholderColor color is wrong #1427

taojeff opened this issue Mar 13, 2024 · 0 comments

Comments

@taojeff
Copy link

taojeff commented Mar 13, 2024

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant