Skip to content

Commit ee16a9a

Browse files
Merge branch 'vorapoap-master' into dev
2 parents aeaaca9 + 021967b commit ee16a9a

File tree

1 file changed

+14
-4
lines changed

1 file changed

+14
-4
lines changed

jquery-ui-timepicker-addon.js

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -597,10 +597,20 @@ $.extend(Timepicker.prototype, {
597597
if (dp_inst.lastVal !== undefined && (dp_inst.lastVal.length > 0 && this.$input.val().length === 0))
598598
return;
599599

600-
if (this._defaults.timeOnly === true) formattedDateTime = this.formattedTime;
601-
else if (this._defaults.timeOnly !== true && (this._defaults.alwaysSetTime || timeAvailable)) {
602-
if (this.$altInput) this.$altInput.val(this.formattedTime);
603-
else formattedDateTime += ' ' + this.formattedTime;
600+
if (this._defaults.timeOnly === true) {
601+
formattedDateTime = this.formattedTime;
602+
if (this.$altInput) {
603+
this.$altInput.val(this.formattedDateTime);
604+
}
605+
} else if (this._defaults.timeOnly !== true && (this._defaults.alwaysSetTime || timeAvailable)) {
606+
if (this.$altInput) {
607+
if (this._defaults.timeOnly !== true) {
608+
this.$altInput.val(this.$altInput.val() + ' ' + this.formattedTime);
609+
} else {
610+
this.$altInput.val(this.formattedDateTime);
611+
}
612+
}
613+
formattedDateTime += ' ' + this.formattedTime;
604614
}
605615

606616
this.formattedDateTime = formattedDateTime;

0 commit comments

Comments
 (0)