]> source.dussan.org Git - jquery-ui.git/commitdiff
Datepicker: made it possible to select a date in the selected month using enter....
authorpheiberg <peter@heiberg.se>
Wed, 24 Nov 2010 18:17:23 +0000 (19:17 +0100)
committerScott González <scott.gonzalez@gmail.com>
Tue, 30 Nov 2010 22:46:53 +0000 (17:46 -0500)
ui/jquery.ui.datepicker.js

index ed2ab06009791a22fcaebae319a1f9943c47708a..519b8a91301c582ebb27b45884ffe0429f52bd26 100644 (file)
@@ -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