diff options
author | Vorapoap L. <vorapoap@hotmail.com> | 2010-12-16 09:07:52 -0800 |
---|---|---|
committer | Vorapoap L. <vorapoap@hotmail.com> | 2010-12-16 09:07:52 -0800 |
commit | 2ec0a4e02120ec2a4370867924b004a8ef58dd7c (patch) | |
tree | d5ea84070319dfc7047680f5886cb51ed9bf3135 /jquery-ui-timepicker-addon.js | |
parent | 27815082b54ad7ec7e831cdbd7e3dbbf2b7e3fd8 (diff) | |
download | jQuery-Timepicker-Addon-2ec0a4e02120ec2a4370867924b004a8ef58dd7c.zip jQuery-Timepicker-Addon-2ec0a4e02120ec2a4370867924b004a8ef58dd7c.tar.gz jQuery-Timepicker-Addon-2ec0a4e02120ec2a4370867924b004a8ef58dd7c.tar.bz2 |
Fix so altField(if set) show both Date and Time
Diffstat (limited to 'jquery-ui-timepicker-addon.js')
-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; } |