diff options
author | marcneuwirth <marc.neuwirth@gmail.com> | 2011-06-28 10:49:47 -0500 |
---|---|---|
committer | Corey Frang <gnarf@gnarf.net> | 2011-06-28 10:50:58 -0500 |
commit | bb9f9fac816dd379e810e8b70823bb7980250ffb (patch) | |
tree | 4c777c3733329096a01ef3c34a863427ddf64715 /tests/unit | |
parent | 86a09aeb332851971bc2b2ce6bbf4d4292b12020 (diff) | |
download | jquery-ui-bb9f9fac816dd379e810e8b70823bb7980250ffb.tar.gz jquery-ui-bb9f9fac816dd379e810e8b70823bb7980250ffb.zip |
Datepicker: Added onSelect.apply() call to _doKeyDown method when enter button pushed if onSelect is defined. Fixed #7124 - Datepicker: onSelect does not fire when enter button is pushed
(cherry picked from commit a56aa861b1deb6d71ec74a77647d12d50570ea57)
Diffstat (limited to 'tests/unit')
-rw-r--r-- | tests/unit/datepicker/datepicker_events.js | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/unit/datepicker/datepicker_events.js b/tests/unit/datepicker/datepicker_events.js index 858cf682a..bcd990889 100644 --- a/tests/unit/datepicker/datepicker_events.js +++ b/tests/unit/datepicker/datepicker_events.js @@ -46,6 +46,11 @@ test('events', function() { simulate('keydown', {keyCode: $.simulate.VK_ESC}); equals(selectedDate, $.datepicker.formatDate('mm/dd/yy', date), 'Callback selected date - esc'); + var dateStr = '02/04/2008'; + inp.val(dateStr).datepicker('show'). + simulate('keydown', {keyCode: $.simulate.VK_ENTER}); + equals(dateStr, selectedDate, + 'onSelect is called after enter keydown'); // onChangeMonthYear inp.datepicker('option', {onChangeMonthYear: callback2, onSelect: null}). val('').datepicker('show'); |