Merge remote-tracking branch 'trentrichardson/dev' into iso8601-tz
This commit is contained in:
commit
ceabba803d
12
jquery-ui-timepicker-addon.js
vendored
12
jquery-ui-timepicker-addon.js
vendored
|
@ -1017,7 +1017,17 @@ $.datepicker._gotoToday = function(id) {
|
|||
var inst = this._getInst($(id)[0]),
|
||||
$dp = inst.dpDiv;
|
||||
this._base_gotoToday(id);
|
||||
this._setTime(this._getInst($(id)[0]), new Date());
|
||||
var now = new Date();
|
||||
var tp_inst = this._get(inst, 'timepicker');
|
||||
if (tp_inst._defaults.showTimezone && tp_inst.timezone_select) {
|
||||
var tzoffset = now.getTimezoneOffset(); // If +0100, returns -60
|
||||
var tzsign = tzoffset > 0 ? '-' : '+';
|
||||
tzoffset = Math.abs(tzoffset);
|
||||
var tzmin = tzoffset % 60
|
||||
tzoffset = tzsign + ('0' + (tzoffset - tzmin) / 60).slice(-2) + ('0' + tzmin).slice(-2);
|
||||
tp_inst.timezone_select.val(tzoffset);
|
||||
}
|
||||
this._setTime(inst, now);
|
||||
$( '.ui-datepicker-today', $dp).click();
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue