Skip to content

Commit 9efeb99

Browse files
Fix bug where ampm is not displayed when first initiated
1 parent 9998030 commit 9efeb99

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

jquery-ui-timepicker-addon.js

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -562,14 +562,12 @@ $.extend(Timepicker.prototype, {
562562

563563
if (hasChanged) {
564564

565-
if (hour !== false) {
566-
this.hour = hour;
567-
if (this._defaults.ampm) this.ampm = ampm;
568-
}
565+
if (hour !== false)this.hour = hour;
569566
if (minute !== false) this.minute = minute;
570567
if (second !== false) this.second = second;
571-
572568
}
569+
if (this._defaults.ampm) this.ampm = ampm;
570+
573571
this._formatTime();
574572
if (this.$timeObj) this.$timeObj.text(this.formattedTime);
575573
this.timeDefined = true;

0 commit comments

Comments
 (0)