Skip to content

Commit 351619d

Browse files
committed
Fix for bug that caused 24h time to be parsed as 12h time
1 parent 454af7b commit 351619d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

jquery-ui-timepicker-addon.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ $.extend(Timepicker.prototype, {
194194

195195
if (order.m !== -1) this.minute = Number(treg[order.m]);
196196
if (order.s !== -1) this.second = Number(treg[order.s]);
197-
197+
198198
return true;
199199

200200
} else return false;
@@ -456,7 +456,7 @@ $.extend(Timepicker.prototype, {
456456

457457
if (hour) {
458458
this.hour = parseFloat(hour).toFixed(0);
459-
this.ampm = ampm;
459+
if (this._defaults.ampm) this.ampm = ampm;
460460
}
461461
if (minute) this.minute = parseFloat(minute).toFixed(0);
462462
if (second) this.second = parseFloat(second).toFixed(0);

0 commit comments

Comments
 (0)