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

Disable previous dates in same month with today #302

Closed
thaoth58 opened this issue May 23, 2016 · 3 comments
Closed

Disable previous dates in same month with today #302

thaoth58 opened this issue May 23, 2016 · 3 comments

Comments

@thaoth58
Copy link

First, thank for your great library.

Now i want to disable (with light gray color and unable to click) previous dates, can you show me how to do it. Thank you so much !

@WenchaoD
Copy link
Owner

  1. Implement -calendar:shouldSelectDate: of FSCalendarDataSource, if the date is previous of today, return NO
  2. Implement -calendar:appearance:titleColorForDate: of FSCalendarDelegateAppearance, if the date is previous of today, return [UIColor lightGrayColor]

@elbertvaldian
Copy link

i can disable the button with userInteractionEnabled with false. Now, can i disable the swipe action to previous month? thanks

@r00tify
Copy link

r00tify commented Jan 24, 2018

@elbertvaldian, you can implement the minimumDate method by conforming to FSCalendarDataSource and return the current date.

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

4 participants