Fscalendar: Disable previous dates in same month with today

Created on 23 May 2016  路  3Comments  路  Source: WenchaoD/FSCalendar

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 !

Most helpful comment

  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]

All 3 comments

  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]

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

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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

iHamzaaK picture iHamzaaK  路  5Comments

shilpashreemayigaiah picture shilpashreemayigaiah  路  3Comments

denikaev picture denikaev  路  5Comments

bizibizi picture bizibizi  路  3Comments

IpyCreator picture IpyCreator  路  5Comments