Datepicker: Fixed #4917 Enter key press on popup fails if _dayOverClass td is after _currentClass td

This commit is contained in:
Keith Wood 2009-12-15 03:42:40 +00:00
parent 6230804514
commit 0a8392186b

View File

@ -480,8 +480,8 @@ $.extend(Datepicker.prototype, {
case 9: $.datepicker._hideDatepicker();
handled = false;
break; // hide on tab out
case 13: var sel = $('td.' + $.datepicker._dayOverClass +
', td.' + $.datepicker._currentClass, inst.dpDiv);
case 13: var sel = $('td.' + $.datepicker._dayOverClass, inst.dpDiv).
add($('td.' + $.datepicker._currentClass, inst.dpDiv));
if (sel[0])
$.datepicker._selectDay(event.target, inst.selectedMonth, inst.selectedYear, sel[0]);
else