Hi, how can i disable past dates? In issue https://github.com/WenchaoD/FSCalendar/issues/302 i don't understand what need to do. I try to compare previous date with now date and i get block for all dates in calendar.
is there anyone here?
You can implement the minimumDate method by conforming to FSCalendarDataSource and return the current date.
Thanks, i resolved problem with this method
func calendar(_ calendar: FSCalendar, shouldSelect date: Date, at monthPosition: FSCalendarMonthPosition) -> Bool {
let curDate = Date().addingTimeInterval(-24*60*60)
if date < curDate {
return false
} else {
return true
}
}
just like @r00tify said. the simple way is you can set minimum date method on FSCalendarDataSource
func minimumDate(for calendar: FSCalendar) -> Date {
return Date()
}
Hello everyone, talking bout FSCalendarDataSource, why is it the mimumDate and maximumDate functions are not getting called? And while the other dataSource functions are getting triggered?
Most helpful comment
just like @r00tify said. the simple way is you can set minimum date method on FSCalendarDataSource
func minimumDate(for calendar: FSCalendar) -> Date { return Date() }