0

i'm using FSCalendar library to make calendar on my app, but how to disable specific date in calendar.

for example if i have data 2017-04-30 30 April 2017 can't be selected.

Any idea how to make this?

Ariel Gemilang
  • 796
  • 2
  • 20
  • 42
  • https://stackoverflow.com/questions/42760793/disable-future-dates-selection-in-fscalendar-swift use this link – BHAVIK Jul 17 '17 at 06:42

2 Answers2

6

You can use FSCalendar delegate method,

func calendar(_ calendar: FSCalendar, shouldSelect date: Date, at monthPosition: FSCalendarMonthPosition) -> Bool
{
    if(date == your date)
    {
        return false
    }
    else
    {
        return true
    }
}
Manfred Radlwimmer
  • 13,257
  • 13
  • 53
  • 62
Hardik
  • 389
  • 4
  • 9
2

Please implement **

-calendar:shouldSelectDate:

and

-calendar:appearance:titleDefaultColorForDate:.

The DelegateAppearanceExample and StoryboardExample might help you with the question. Hope this helps.

Burhan Mughal
  • 798
  • 2
  • 7
  • 33