Fixed daylight savings bug i think
This commit is contained in:
parent
48f17b1f71
commit
92f1508c68
11
jquery-ui-timepicker-addon.js
vendored
11
jquery-ui-timepicker-addon.js
vendored
|
@ -675,6 +675,15 @@ $.datepicker._setTime = function(inst, date) {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
//#######################################################################################
|
||||||
|
// datepicker doesn't care about hours.. we do.. leave dp alone this time..
|
||||||
|
//#######################################################################################
|
||||||
|
$.datepicker._daylightSavingAdjustDateTime = function(date) {
|
||||||
|
if (!date) return null;
|
||||||
|
date.setHours(date.getHours() > 12 ? date.getHours() + 2 : date.getHours());
|
||||||
|
return date;
|
||||||
|
};
|
||||||
|
|
||||||
//#######################################################################################
|
//#######################################################################################
|
||||||
// override setDate() to allow getting time too within Date object
|
// override setDate() to allow getting time too within Date object
|
||||||
//#######################################################################################
|
//#######################################################################################
|
||||||
|
@ -698,7 +707,7 @@ $.datepicker._getDate = function(inst) {
|
||||||
if (tp_inst)
|
if (tp_inst)
|
||||||
return startDate = (!inst.currentYear || (inst.input && inst.input.val() == '')) ?
|
return startDate = (!inst.currentYear || (inst.input && inst.input.val() == '')) ?
|
||||||
null :
|
null :
|
||||||
this._daylightSavingAdjust(new Date(inst.currentYear, inst.currentMonth, inst.currentDay, tp_inst.hour, tp_inst.minute, tp_inst.second));
|
this._daylightSavingAdjustDateTime(new Date(inst.currentYear, inst.currentMonth, inst.currentDay, tp_inst.hour, tp_inst.minute, tp_inst.second));
|
||||||
else return $.datepicker._base_getDate(inst);
|
else return $.datepicker._base_getDate(inst);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue