Fix so altField(if set) show both Date and Time

This commit is contained in:
Vorapoap L. 2010-12-16 09:07:52 -08:00
parent 27815082b5
commit 2ec0a4e021

View file

@ -518,7 +518,13 @@ $.extend(Timepicker.prototype, {
if (this._defaults.timeOnly === true) formattedDateTime = this.formattedTime; if (this._defaults.timeOnly === true) formattedDateTime = this.formattedTime;
else if (this._defaults.timeOnly !== true && (this._defaults.alwaysSetTime || timeAvailable)) { 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; else formattedDateTime += ' ' + this.formattedTime;
} }