Skip to content

Commit 47dbb0f

Browse files
Issue #223 - Apply fix to gotoToday proposed fix
1 parent 970de92 commit 47dbb0f

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

dist/jquery-ui-timepicker-addon.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -1546,14 +1546,14 @@
15461546
*/
15471547
$.datepicker._base_gotoToday = $.datepicker._gotoToday;
15481548
$.datepicker._gotoToday = function (id) {
1549-
var inst = this._getInst($(id)[0]),
1550-
$dp = inst.dpDiv;
1549+
var inst = this._getInst($(id)[0]);
1550+
this._base_gotoToday(id);
15511551
var tp_inst = this._get(inst, 'timepicker');
1552-
selectLocalTimezone(tp_inst);
1552+
var tzoffset = $.timepicker.timezoneOffsetNumber(tp_inst.timezone);
15531553
var now = new Date();
1554+
now.setMinutes(now.getMinutes() + now.getTimezoneOffset() + tzoffset);
15541555
this._setTime(inst, now);
15551556
this._setDate(inst, now);
1556-
this._base_gotoToday(id);
15571557
};
15581558

15591559
/*

0 commit comments

Comments
 (0)