Skip to main content

Search and Top Navigation

Ticket #5151: jquery.ui.datepicker.patch.txt


File jquery.ui.datepicker.patch.txt, 0.9 KB (added by maxbarbul, October 27, 2010 01:47PM UTC)

Workaround of this issue. Added new option {Date} "todayDate". You need to set it whatever you want.

diff -r1.1 jquery.ui.datepicker.js
825c825
< 			var date = new Date();
---
> 			var date = this._get(inst, 'todayDate') || new Date();
1257c1257
< 			this._determineDate(inst, this._get(inst, 'defaultDate'), new Date()));
---
> 			this._determineDate(inst, this._get(inst, 'defaultDate'), this._get(inst, 'todayDate') || new Date()));
1263c1263
< 			var date = new Date();
---
> 			var date = this._get(inst, 'todayDate') || new Date();
1276c1276
< 				$.datepicker._getDate(inst) : null) || new Date();
---
> 				$.datepicker._getDate(inst) : null) || $.datepicker._get(inst, 'todayDate') || new Date();
1330c1330
< 		date = this._restrictMinMax(inst, this._determineDate(inst, date, new Date()));
---
> 		date = this._restrictMinMax(inst, this._determineDate(inst, date, this._get(inst, 'todayDate') || new Date()));
1352c1352
< 		var today = new Date();
---
> 		var today = this._get(inst, 'todayDate') || new Date();

Download in other formats:

Original Format