Esc-key and onblur should close calendar
April 17, 2008 - 12:28am — taimar
| Project: | Date Input |
| Version: | 1.1.6 |
| Component: | User interface |
| Category: | bug report |
| Priority: | critical |
| Assigned: | Unassigned |
| Status: | closed |
Jump to:
Description
Hi.
It would be nice if the calendar can be closed via Esc-key. Hitting the Tab key (focus isn't anymore on date-field) should close the calendar also.
Thanks.

Comments
#1
Adding the following code to the end of the build function should enable hiding the calender when tabbing out of the input:
this.input.blur(this.bindToObj(function() { this.hide(); }))
#2
However, if adding blur event, even clicking on the calendar layer, the value of the input is not changed.
#3
#4
http://github.com/jonleighton/date_input/commit/49c3acb67628d91e68ccee3a...
Hitting tab will now start tabbing through the links in the date picker. When the last one loses focus the picker will be hidden. Hitting Esc will also now hide it.