Skip to content

Commit eb13c01

Browse files
afcapelrdworth
authored andcommitted
Changed comparison to highlight selected date, fixes #5676 (DatePicker Dialog defaultDate incorrect behaviour)
1 parent aa416fc commit eb13c01

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ui/jquery.ui.datepicker.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1491,7 +1491,7 @@ $.extend(Datepicker.prototype, {
14911491
(otherMonth && !showOtherMonths ? ' ' : // display for other months
14921492
(unselectable ? '<span class="ui-state-default">' + printDate.getDate() + '</span>' : '<a class="ui-state-default' +
14931493
(printDate.getTime() == today.getTime() ? ' ui-state-highlight' : '') +
1494-
(printDate.getTime() == currentDate.getTime() ? ' ui-state-active' : '') + // highlight selected day
1494+
(printDate.getTime() == selectedDate.getTime() ? ' ui-state-active' : '') + // highlight selected day
14951495
(otherMonth ? ' ui-priority-secondary' : '') + // distinguish dates from other months
14961496
'" href="#">' + printDate.getDate() + '</a>')) + '</td>'; // display selectable date
14971497
printDate.setDate(printDate.getDate() + 1);

0 commit comments

Comments
 (0)