Version is 7.1.5
Hi, I have a calendar that can go through previous months but not to future months. The problem is for example today is May 15, 2018, right now I can click 16 and so on but I don't want those future dates to be selected.
You get the selection of a date here, func calendar(_ calendar: JTAppleCalendarView, didSelectDate date: Date, cell: JTAppleCell?, cellState: CellState) {...} so you can set a condition accordingly. If it's a future date don't do such task else do.
or if you want to totally refuse the selection of future dates then implement something like
func calendar(_ calendar: JTAppleCalendarView, shouldSelectDate date: Date, cell: JTAppleCell?, cellState: CellState) -> Bool {
return date < Date()
}
will close this issue, but let me know if youre still stuck.
I'm trying to this pass dates, and I used the function with the >= sign instead. But it won't let me select the current date?
Im not sure what you were trying to do.
But if you used
return date >= Date()
Then this logic will do what you coded it do. I can say anything if id do not know what date is.
Yah, I figured it out, printed out the system date and it was a different time than my Timezone, but worked just fine on my phone. Thx for quick rely
cool.