Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Datepicker: Hightlight the curerent date, not the selected date. Fixe…
…s #5984 - Datepicker showing multiple months highlights selected day in all of them
  • Loading branch information
cheeaun authored and scottgonzalez committed Sep 20, 2010
1 parent d380099 commit a936eb3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ui/jquery.ui.datepicker.js
Expand Up @@ -1493,7 +1493,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() == 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);
Expand Down

1 comment on commit a936eb3

@ergec
Copy link

@ergec ergec commented on a936eb3 Sep 30, 2010

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you are using minified & combined version of UI downloaded through ThemeRoller (jquery-ui-1.8.5.custom.min.js), you won't be able to find the line mentioned above.

Instead, try to change this (jquery-ui-1.8.5.custom.min.js, line 534):

q.getTime()==J.getTime()?" ui-state-active":""

into this:

q.getTime()==u.getTime()?" ui-state-active":""

Please sign in to comment.