Preventing setting defaultDate on an empty input to set an (incorrect) input value.
This commit is contained in:
parent
caf2916169
commit
cc80af42fe
4
jquery-ui-timepicker-addon.js
vendored
4
jquery-ui-timepicker-addon.js
vendored
|
@ -721,7 +721,7 @@ $.fn.extend({
|
||||||
datetimepicker: function(o) {
|
datetimepicker: function(o) {
|
||||||
o = o || {};
|
o = o || {};
|
||||||
var $input = this,
|
var $input = this,
|
||||||
tmp_args = arguments;
|
tmp_args = arguments;
|
||||||
|
|
||||||
if (typeof(o) == 'string'){
|
if (typeof(o) == 'string'){
|
||||||
if(o == 'getDate')
|
if(o == 'getDate')
|
||||||
|
@ -908,8 +908,8 @@ $.datepicker._setTimeDatepicker = function(target, date, withDate) {
|
||||||
}
|
}
|
||||||
else tp_date = new Date(date.getTime());
|
else tp_date = new Date(date.getTime());
|
||||||
if (tp_date.toString() == 'Invalid Date') tp_date = undefined;
|
if (tp_date.toString() == 'Invalid Date') tp_date = undefined;
|
||||||
|
this._setTime(inst, tp_date);
|
||||||
}
|
}
|
||||||
this._setTime(inst, tp_date);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue