diff options
author | doublerebel <charles@doublerebel.com> | 2010-12-05 17:19:27 -0800 |
---|---|---|
committer | doublerebel <charles@doublerebel.com> | 2010-12-05 17:19:27 -0800 |
commit | 454af7bcf01d90212ccb7745bab1d6e7a0e2b4a8 (patch) | |
tree | c08c91811a0d531f244527cdda95011343232fa1 /jquery-ui-timepicker-addon.js | |
parent | f31d5ecbeb0801bb65003a34a74fb2cac74ab83f (diff) | |
download | jQuery-Timepicker-Addon-454af7bcf01d90212ccb7745bab1d6e7a0e2b4a8.zip jQuery-Timepicker-Addon-454af7bcf01d90212ccb7745bab1d6e7a0e2b4a8.tar.gz jQuery-Timepicker-Addon-454af7bcf01d90212ccb7745bab1d6e7a0e2b4a8.tar.bz2 |
Reset time to defaults when .datepicker('setTime') is called with no arguments
Diffstat (limited to 'jquery-ui-timepicker-addon.js')
-rw-r--r-- | jquery-ui-timepicker-addon.js | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/jquery-ui-timepicker-addon.js b/jquery-ui-timepicker-addon.js index 62e1894..5fab247 100644 --- a/jquery-ui-timepicker-addon.js +++ b/jquery-ui-timepicker-addon.js @@ -516,7 +516,6 @@ $.extend(Timepicker.prototype, { timeAvailable = dt !== null && this.timeDefined; this.formattedDate = $.datepicker.formatDate(dateFmt, (dt === null ? new Date() : dt), formatCfg); var formattedDateTime = this.formattedDate; - if (dp_inst.lastVal !== undefined && (dp_inst.lastVal.length > 0 && this.$input.val().length === 0)) return; @@ -664,7 +663,6 @@ $.datepicker._gotoToday = function(id) { //####################################################################################### $.datepicker._setTime = function(inst, date) { var tp_inst = this._get(inst, 'timepicker'); - if (tp_inst) { var defaults = tp_inst._defaults, // calling _setTime with no date sets time to defaults @@ -687,7 +685,7 @@ $.datepicker._setTime = function(inst, date) { else tp_inst.second = second; tp_inst._onTimeChange(); - tp_inst._updateDateTime(); + tp_inst._updateDateTime(inst); } }; @@ -699,6 +697,7 @@ $.datepicker._setTimeDatepicker = function(target, date, withDate) { tp_inst = this._get(inst, 'timepicker'); if (tp_inst) { + this._setDateFromField(inst); var tp_date; if (date) { if (typeof date == "string") { |