Fixed getDate for timepicker if not yet been opened
This commit is contained in:
parent
a539339bc4
commit
678fa35243
1 changed files with 6 additions and 2 deletions
8
jquery-ui-timepicker-addon.js
vendored
8
jquery-ui-timepicker-addon.js
vendored
|
@ -738,11 +738,15 @@ $.datepicker._base_getDateDatepicker = $.datepicker._getDateDatepicker;
|
||||||
$.datepicker._getDateDatepicker = function(target, noDefault) {
|
$.datepicker._getDateDatepicker = function(target, noDefault) {
|
||||||
var inst = this._getInst(target),
|
var inst = this._getInst(target),
|
||||||
tp_inst = this._get(inst, 'timepicker');
|
tp_inst = this._get(inst, 'timepicker');
|
||||||
if (tp_inst)
|
|
||||||
|
if (tp_inst){
|
||||||
|
this._setDateFromField(inst, noDefault);
|
||||||
|
this._updateDatepicker(inst);
|
||||||
|
|
||||||
return (!inst.currentYear || (inst.input && inst.input.val() == '')) ?
|
return (!inst.currentYear || (inst.input && inst.input.val() == '')) ?
|
||||||
null :
|
null :
|
||||||
(new Date(inst.currentYear, inst.currentMonth, inst.currentDay, tp_inst.hour, tp_inst.minute, tp_inst.second));
|
(new Date(inst.currentYear, inst.currentMonth, inst.currentDay, tp_inst.hour, tp_inst.minute, tp_inst.second));
|
||||||
|
}
|
||||||
return this._base_getDateDatepicker(target, noDefault);
|
return this._base_getDateDatepicker(target, noDefault);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue