Search code examples
swiftxcodefscalendar

How to deselect all selected dates at once in FSCalendar?


I need a help for to create a function to clear all the dates selected in my FScalendar. (https://github.com/WenchaoD/FSCalendar)

I just looking into the web and found it this bucle...

   for (NSDate *date in _calendar.selectedDates) {
        [_calendar deselectDate:date];
    }

I dont understand where can i put this code into the button that i have... Can anyone help me to understand this? Thank you very much! Regards.


Solution

  • You can use this method:

    self.CalendarView.deselect(currentDate)