|
35 | 35 | * in order to have ability to know actual store time even if page hadn't been reloaded
|
36 | 36 | * @returns {Date}
|
37 | 37 | */
|
38 |
| - _getTimezoneDateDatepicker: function () { |
| 38 | + _getTimezoneDate: function () { |
39 | 39 | // local time in ms
|
40 | 40 | var ms = Date.now(),
|
41 | 41 | options = $.calendarConfig ? $.calendarConfig : {};
|
|
58 | 58 | * @param {String|Object} target - the target input field or division or span
|
59 | 59 | */
|
60 | 60 | _setTimezoneDateDatepicker: function (target) {
|
61 |
| - this._setDateDatepicker(target, this._getTimezoneDateDatepicker()); |
| 61 | + this._setDateDatepicker(target, this._getTimezoneDate()); |
62 | 62 | }
|
63 | 63 | });
|
64 | 64 |
|
|
120 | 120 | * @return {String} html template
|
121 | 121 | */
|
122 | 122 | $.datepicker.constructor.prototype._generateHTML = function (inst) {
|
123 |
| - var today = this._getTimezoneDateDatepicker(), |
| 123 | + var today = this._getTimezoneDate(), |
124 | 124 | isRTL = this._get(inst, 'isRTL'),
|
125 | 125 | showButtonPanel = this._get(inst, 'showButtonPanel'),
|
126 | 126 | hideIfNoPrevNext = this._get(inst, 'hideIfNoPrevNext'),
|
|
396 | 396 | * @return {Object} date
|
397 | 397 | */
|
398 | 398 | getTimezoneDate: function () {
|
399 |
| - return this.element[this._picker()]('getTimezoneDate'); |
| 399 | + return datepickerPrototype._getTimezoneDate.call(this); |
400 | 400 | }
|
401 | 401 | });
|
402 | 402 |
|
|
549 | 549 | * @param {Object} el
|
550 | 550 | */
|
551 | 551 | $.datepicker._gotoToday = function (el) {
|
552 |
| - var pickerObject = $(el); |
553 | 552 |
|
554 | 553 | //Set date/time according to timezone offset
|
555 |
| - pickerObject.datepicker('setTimezoneDate') |
| 554 | + $(el).datepicker('setTimezoneDate') |
556 | 555 | // To ensure that user can re-select date field without clicking outside it first.
|
557 | 556 | .blur();
|
558 | 557 | };
|
|
0 commit comments