diff options
-rw-r--r-- | jquery-ui-timepicker-addon.js | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/jquery-ui-timepicker-addon.js b/jquery-ui-timepicker-addon.js index 11834a9..6604115 100644 --- a/jquery-ui-timepicker-addon.js +++ b/jquery-ui-timepicker-addon.js @@ -518,7 +518,13 @@ $.extend(Timepicker.prototype, { if (this._defaults.timeOnly === true) formattedDateTime = this.formattedTime; else if (this._defaults.timeOnly !== true && (this._defaults.alwaysSetTime || timeAvailable)) { - if (this.$altInput) this.$altInput.val(this.formattedTime); + if (this.$altInput) { + if (this._defaults.timeOnly !== true) { + this.$altInput.val(this.$altInput.val() + ' ' + this.formattedTime); + } else { + this.$altInput.val(this.formattedDateTime); + } + } else formattedDateTime += ' ' + this.formattedTime; } |