From cc80af42fe1ca6555c489c937929a49bba6a5468 Mon Sep 17 00:00:00 2001 From: Bruno Harbulot Date: Sun, 13 Mar 2011 20:27:16 +0000 Subject: [PATCH] Preventing setting defaultDate on an empty input to set an (incorrect) input value. --- jquery-ui-timepicker-addon.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jquery-ui-timepicker-addon.js b/jquery-ui-timepicker-addon.js index 4e74547..65a0b8d 100644 --- a/jquery-ui-timepicker-addon.js +++ b/jquery-ui-timepicker-addon.js @@ -721,7 +721,7 @@ $.fn.extend({ datetimepicker: function(o) { o = o || {}; var $input = this, - tmp_args = arguments; + tmp_args = arguments; if (typeof(o) == 'string'){ if(o == 'getDate') @@ -908,8 +908,8 @@ $.datepicker._setTimeDatepicker = function(target, date, withDate) { } else tp_date = new Date(date.getTime()); if (tp_date.toString() == 'Invalid Date') tp_date = undefined; + this._setTime(inst, tp_date); } - this._setTime(inst, tp_date); } };