LPKit
LPKit copied to clipboard
Keyboard arrow support for LPCalendarView
Let users navigate the calendar by using the up, down, left and right arrows on their keyboards.
one note i'd like to make is that if we had an easy way to get the selected index/indices it would be much easier to implement. The selected index doesn't always get set, nor does it automatically fix itself when the calendar is moved (back or forward 1 month)
This is what I ran into when I tried to implement it myself.
I was able to move through a single month just fine, but when I changed months the index was off (since it wasn't reset)
Hm, is this really necessary? You shouldn't really mess about with indexes, only dates.
Using:
- (void)makeSelectionWithDate:(CPDate)aStartDate end:(CPDate)anEndDate
to make a new selection, adding / subtracting a day / week to the currently selected date depending on the button clicked should be the way to do it.