]> source.dussan.org Git - jquery-ui.git/commitdiff
Datepicker: Fixed #4917 Enter key press on popup fails if _dayOverClass td is after...
authorKeith Wood <kbwood.au@gmail.com>
Tue, 15 Dec 2009 03:42:40 +0000 (03:42 +0000)
committerKeith Wood <kbwood.au@gmail.com>
Tue, 15 Dec 2009 03:42:40 +0000 (03:42 +0000)
ui/jquery.ui.datepicker.js

index 9b1025fe7d24493a213a7132fa42c9e2d786156b..f1c05a02a85603dc804788db733ce8792f18b151 100644 (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