From: pheiberg Date: Wed, 24 Nov 2010 18:17:23 +0000 (+0100) Subject: Datepicker: made it possible to select a date in the selected month using enter.... X-Git-Tag: 1.8.7~13 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=98f7e6a8d615772fbddbf185241d087a95e5e121;p=jquery-ui.git Datepicker: made it possible to select a date in the selected month using enter. Fixes #5527 - Datepicker: Problem selecting the date with keyboard shorcuts --- diff --git a/ui/jquery.ui.datepicker.js b/ui/jquery.ui.datepicker.js index ed2ab0600..519b8a913 100644 --- a/ui/jquery.ui.datepicker.js +++ b/ui/jquery.ui.datepicker.js @@ -500,8 +500,8 @@ $.extend(Datepicker.prototype, { case 9: $.datepicker._hideDatepicker(); handled = false; break; // hide on tab out - case 13: var sel = $('td.' + $.datepicker._dayOverClass, inst.dpDiv). - add($('td.' + $.datepicker._currentClass, inst.dpDiv)); + case 13: var sel = $('td.' + $.datepicker._dayOverClass + ':not(.' + + $.datepicker._currentClass + ')', inst.dpDiv); if (sel[0]) $.datepicker._selectDay(event.target, inst.selectedMonth, inst.selectedYear, sel[0]); else