jivesoftware / PDTSimpleCalendar

A simple Calendar / Date Picker for iOS using UICollectionView

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Identify when a user selected a date.

markst opened this issue · comments

I'm changing a table view scroll whenever the delegate didSelectDate: is called.
Though I'm also selecting a date programatically sometimes, which results in didSelectDate: being called when I don't need it to be. Is it possible to identify when a user has selected a date & when I have set the selected date?

commented

Yes at the moment, when you actually set the new selectedDate, the delegate gets called.
I know it can be frustrating.
If you can come up with an elegant solution on how to handle that directly from the library let me know.

Otherwise it's gonna be some if/else in your code to ignore a "programatically set date".
One solution would be to nil-out the delegate juste before and set it back after. or the delegate having access to the programmatically set date, so it can ignore it and exit early.

@jmig Please help me with this #98