Skip to content
Permalink
Browse files

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 14, 2010
1 parent d380099 commit a936eb3c0982293940a3f3135fc85178bf17534d
Showing with 1 addition and 1 deletion.
  1. +1 −1 ui/jquery.ui.datepicker.js
@@ -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);

1 comment on commit a936eb3

@ergec

This comment has been minimized.

Copy link

@ergec ergec commented on a936eb3 Sep 30, 2010

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.
You can’t perform that action at this time.