]> source.dussan.org Git - jquery-ui.git/commitdiff
Datepicker: Hightlight the curerent date, not the selected date. Fixes #5984 - Datepi...
authorLim Chee Aun <cheeaun@gmail.com>
Tue, 14 Sep 2010 04:33:56 +0000 (12:33 +0800)
committerScott González <scott.gonzalez@gmail.com>
Mon, 20 Sep 2010 13:49:11 +0000 (09:49 -0400)
ui/jquery.ui.datepicker.js

index d1d8a4d11ad88f0f62f8ae50e0c931911ede06ba..ccbcc6dac240f1fdf505ac096f010ec450dc6e98 100644 (file)
@@ -1493,7 +1493,7 @@ $.extend(Datepicker.prototype, {
                                                        (otherMonth && !showOtherMonths ? '&#xa0;' : // display for other months
                                                        (unselectable ? '<span class="ui-state-default">' + printDate.getDate() + '</span>' : '<a class="ui-state-default' +
                                                        (printDate.getTime() == today.getTime() ? ' ui-state-highlight' : '') +
-                                                       (printDate.getTime() == selectedDate.getTime() ? ' ui-state-active' : '') + // highlight selected day
+                                                       (printDate.getTime() == currentDate.getTime() ? ' ui-state-active' : '') + // highlight selected day
                                                        (otherMonth ? ' ui-priority-secondary' : '') + // distinguish dates from other months
                                                        '" href="#">' + printDate.getDate() + '</a>')) + '</td>'; // display selectable date
                                                printDate.setDate(printDate.getDate() + 1);