keyboard.rst 1.3 KB

123456789101112131415161718192021222324252627
  1. Keyboard support
  2. ================
  3. The datepicker includes keyboard navigation. The "focused date" is kept track of and highlighted (as with mouse hover) during keyboard nav, and is cleared when a date is toggled or the picker is hidden.
  4. up, down, left, right arrow keys
  5. --------------------------------
  6. By themselves, left/right will move focus backward/forward one day, up/down will move focus back/forward one week.
  7. With the shift key, up/left will move focus backward one month, down/right will move focus forward one month.
  8. With the ctrl key, up/left will move focus backward one year, down/right will move focus forward one year.
  9. Shift+ctrl behaves the same as ctrl -- that is, it does not change both month and year simultaneously, only the year.
  10. enter
  11. -----
  12. When the picker is visible, enter will toggle the focused date (if there is one). When the picker is not visible, enter will have normal effects -- submitting the current form, etc.
  13. When the date is deselected, the ``clearDate`` event is triggered; otherwise, the ``changeDate`` event is triggered. If ``autoclose`` is enabled, the picker will be hidden after selection or deselection.
  14. escape
  15. ------
  16. The escape key can be used to clear the focused date and hide and re-show the datepicker; hiding the picker is necessary if the user wants to manually edit the value.