Jtapplecalendar: How to deselect cell on second tap?

Created on 31 Oct 2016  路  3Comments  路  Source: patchthecode/JTAppleCalendar

Let's say user selects specific day on calendar and cell shows selection view like in tutorial. How can I deselect this cell on second tap?

Is it even possible? I'm not sure but I guess that UserInteractionFunctions.swift:396 has some logic that blocks deselection behaviour.

question

Most helpful comment

This calendar operates much like a UITableView.
Have you tried enabling multi selection?

calendarView.allowsMultipleSelection = true

This will allow you to select and deselect values.

All 3 comments

This calendar operates much like a UITableView.
Have you tried enabling multi selection?

calendarView.allowsMultipleSelection = true

This will allow you to select and deselect values.

Thanks for quick response! It's partly what I need. How can I deselect all other dates when user selects some specific date?

Ok, now I get it. In didSelectDate:
calendar.selectDates(calendar.selectedDates.filter({ $0 != date }))

Was this page helpful?
0 / 5 - 0 ratings

Related issues

MoridinBG picture MoridinBG  路  5Comments

Fatalution picture Fatalution  路  3Comments

programus picture programus  路  3Comments

carlosper88 picture carlosper88  路  4Comments

gotamafandy picture gotamafandy  路  3Comments