Skip to content

Commit cc80af4

Browse files
committed
Preventing setting defaultDate on an empty input to set an (incorrect) input value.
1 parent caf2916 commit cc80af4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

jquery-ui-timepicker-addon.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -721,7 +721,7 @@ $.fn.extend({
721721
datetimepicker: function(o) {
722722
o = o || {};
723723
var $input = this,
724-
tmp_args = arguments;
724+
tmp_args = arguments;
725725

726726
if (typeof(o) == 'string'){
727727
if(o == 'getDate')
@@ -908,8 +908,8 @@ $.datepicker._setTimeDatepicker = function(target, date, withDate) {
908908
}
909909
else tp_date = new Date(date.getTime());
910910
if (tp_date.toString() == 'Invalid Date') tp_date = undefined;
911+
this._setTime(inst, tp_date);
911912
}
912-
this._setTime(inst, tp_date);
913913
}
914914

915915
};

0 commit comments

Comments
 (0)