Suppose Jane Smith is using the keyboard to edit a form. She tabs into a datepicker input, and the datepicker calendar pops up. She presses CTRL + RIGHT three times to move the selected date three days forward, then presses ENTER to finalize her choice of date.
How can I get the currently active date each time she presses CTRL + RIGHT? The onSelect event in the datepicker docs only fires when ENTER is pressed.
I want to add ARIA alerts to the datepicker so that blind users can use the datepicker even though they can't see to use the mouse. A transcript might go like this:
beforeShow: "Date picker started. Press control + shift + ? for key help. Current date is foo" onDateChange: (announces date) onDateChange: (announces date) onDateChange: (announces date) onSelect: "Selected date foo. Date picker closed."
Except that there doesn't seem to be an onDateChange event.
I could write my own event handlers to respond to the same keyboard shortcuts that datepicker does and get the internal variables for the current date. But it'd be an awful kludge, plus it'd probably lead to race conditions where the ARIA alerts would only function correctly if the datepicker event handler executes first.