Skip to content

Commit 52278f8

Browse files
committed
Fixed trentrichardson#303 (by jun66j5): timeFormat: 'tt h:mm' is not parsed
trentrichardson#303
1 parent 0a68b5c commit 52278f8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

jquery-ui-timepicker-addon.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ $.extend(Timepicker.prototype, {
247247
var dp_dateFormat = $.datepicker._get(this.inst, 'dateFormat');
248248
// escape special regex characters in the seperator
249249
var specials = new RegExp("[.*+?|()\\[\\]{}\\\\]", "g");
250-
regstr = '.{' + dp_dateFormat.length + ',}' + this._defaults.separator.replace(specials, "\\$&") + regstr;
250+
regstr = '^.{' + dp_dateFormat.length + ',}?' + this._defaults.separator.replace(specials, "\\$&") + regstr;
251251
}
252252

253253
treg = timeString.match(new RegExp(regstr, 'i'));

0 commit comments

Comments
 (0)