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

This commit is contained in:
Vorapoap L. 2010-12-16 09:31:15 -08:00
parent 2ec0a4e021
commit 35cdf9add9

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);