Permalink
Browse files

Changed comparison to highlight selected date, fixes #5676 (DatePicke…

…r Dialog defaultDate incorrect behaviour)
  • Loading branch information...
1 parent aa416fc commit eb13c017228674d60cdb95a411195ebb14cc8a51 @afcapel afcapel committed with rdworth Jun 13, 2010
Showing with 1 addition and 1 deletion.
  1. +1 −1 ui/jquery.ui.datepicker.js
@@ -1491,7 +1491,7 @@ $.extend(Datepicker.prototype, {
(otherMonth && !showOtherMonths ? ' ' : // 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() == currentDate.getTime() ? ' ui-state-active' : '') + // highlight selected day
+ (printDate.getTime() == selectedDate.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);

0 comments on commit eb13c01

Please sign in to comment.