aboutsummaryrefslogtreecommitdiffstats
path: root/ui/jquery.ui.datepicker.js
diff options
context:
space:
mode:
authorAlberto Fernández Capel <afcapel@gmail.com>2010-06-13 19:00:04 +0800
committerRichard D. Worth <rdworth@gmail.com>2010-06-14 16:46:04 +0800
commiteb13c017228674d60cdb95a411195ebb14cc8a51 (patch)
tree1cc03bbe829cd51516ac2a963777b4863a1d1c91 /ui/jquery.ui.datepicker.js
parentaa416fcfd9ba49ef2d8426ccc5a002388d390574 (diff)
downloadjquery-ui-eb13c017228674d60cdb95a411195ebb14cc8a51.tar.gz
jquery-ui-eb13c017228674d60cdb95a411195ebb14cc8a51.zip
Changed comparison to highlight selected date, fixes #5676 (DatePicker Dialog defaultDate incorrect behaviour)
Diffstat (limited to 'ui/jquery.ui.datepicker.js')
-rw-r--r--ui/jquery.ui.datepicker.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/ui/jquery.ui.datepicker.js b/ui/jquery.ui.datepicker.js
index ee3d79ef4..255fcc904 100644
--- a/ui/jquery.ui.datepicker.js
+++ b/ui/jquery.ui.datepicker.js
@@ -1491,7 +1491,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() == 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);