Skip to content

Commit 193bdd6

Browse files
committed
Inline today variable to avoid showing wrong today date in long lived pages.
1 parent b1b3819 commit 193bdd6

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

datepicker-rewrite/date.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ $.date = function ( datestring, formatstring ) {
6262
},
6363
days: function() {
6464
var result = [],
65+
today = $.date(),
6566
firstDayOfMonth = new Date( this.year(), date.getMonth(), 1 ).getDay(),
6667
leadDays = ( firstDayOfMonth - calendar.firstDay + 7 ) % 7,
6768
rows = Math.ceil( ( leadDays + this.daysInMonth() ) / 7),
@@ -142,6 +143,4 @@ $.date = function ( datestring, formatstring ) {
142143
}
143144
}
144145

145-
var today = $.date();
146-
147146
}( jQuery ));

0 commit comments

Comments
 (0)