When showTimezone is true, "Now" button sets the current timezone.

This commit is contained in:
Jun Omae 2011-08-12 19:09:22 +09:00
parent 5ab6e7bc7d
commit b7293ca2a5

View file

@ -991,7 +991,7 @@ $.datepicker._gotoToday = function(id) {
this._base_gotoToday(id);
var now = new Date();
var tp_inst = this._get(inst, 'timepicker');
if (tp_inst.timezone_select) {
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);