Jtapplecalendar: How to disable date selection

Created on 11 Oct 2017  Â·  1Comment  Â·  Source: patchthecode/JTAppleCalendar

Hi Jay,

I am selecting date range (for e.g. 12 October to 18 October) & I want to enable date selection only between this date range. That is I want to disable dates which are not in the date range.

Could you pls help in achieving this functionality.

Thanks
Sachin

Most helpful comment

@Sachin-Raut this calendar is a UICollectionView.
So it is done in pretty much the same way.

implement the following function.

calendar(_ calendar: JTAppleCalendarView, shouldSelectDate date: Date, cell: JTAppleCell?, cellState: CellState) -> Bool {
// if i want to disable click, return false else return true
}

Closing this issue. Let me know if anything else is needed.

>All comments

@Sachin-Raut this calendar is a UICollectionView.
So it is done in pretty much the same way.

implement the following function.

calendar(_ calendar: JTAppleCalendarView, shouldSelectDate date: Date, cell: JTAppleCell?, cellState: CellState) -> Bool {
// if i want to disable click, return false else return true
}

Closing this issue. Let me know if anything else is needed.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

PedroAnibarro1 picture PedroAnibarro1  Â·  5Comments

Kevinw14 picture Kevinw14  Â·  3Comments

blinkmeoff picture blinkmeoff  Â·  3Comments

zhanswift picture zhanswift  Â·  5Comments

MoridinBG picture MoridinBG  Â·  5Comments