Fix so altField for timepicker mode also show time if altField is set

master
Vorapoap L. 2010-12-16 09:31:15 -08:00
parent 2ec0a4e021
commit 35cdf9add9
1 changed files with 6 additions and 2 deletions

View File

@ -516,8 +516,12 @@ $.extend(Timepicker.prototype, {
if (dp_inst.lastVal !== undefined && (dp_inst.lastVal.length > 0 && this.$input.val().length === 0))
return;
if (this._defaults.timeOnly === true) formattedDateTime = this.formattedTime;
else if (this._defaults.timeOnly !== true && (this._defaults.alwaysSetTime || timeAvailable)) {
if (this._defaults.timeOnly === true) {
formattedDateTime = this.formattedTime;
if (this.$altInput) {
this.$altInput.val(this.formattedDateTime);
}
} else if (this._defaults.timeOnly !== true && (this._defaults.alwaysSetTime || timeAvailable)) {
if (this.$altInput) {
if (this._defaults.timeOnly !== true) {
this.$altInput.val(this.$altInput.val() + ' ' + this.formattedTime);