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

-minimumDateForCalendar: bug #529

Closed
Anobisoft opened this issue Dec 23, 2016 · 3 comments
Closed

-minimumDateForCalendar: bug #529

Anobisoft opened this issue Dec 23, 2016 · 3 comments

Comments

@Anobisoft
Copy link

Anobisoft commented Dec 23, 2016

if minimumDateForCalendar is not strictly start of day, selecting cells causes very strange behavior.

@Anobisoft Anobisoft changed the title minimumDateForCalendar bug -minimumDateForCalendar: bug Dec 23, 2016
@gaochar
Copy link

gaochar commented Dec 23, 2016

我也遇到这个问题,在- (NSDate *)minimumDateForCalendar:(FSCalendar *)calendar;设置不会把minimumDate之前的日期置灰,左右滑动会滑动到2063年。
顺便测试下- (NSDate *)maximumDateForCalendar:(FSCalendar *)calendar;没有问题。
请问大神怎么解决?

@Anobisoft
Copy link
Author

workaround:

- (NSDate *)minimumDateForCalendar:(FSCalendar *)calendar {
    NSDate *minimumDate = [NSDate date]; //For example
    return [[NSCalendar currentCalendar] startOfDayForDate:minimumDate];
}

@WenchaoD
Copy link
Owner

WenchaoD commented Dec 26, 2016

Better than setting hour、minute、seconds to zero of date. That's a great solution. 👍

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

3 participants