Skip to content

Commit 547e6ad

Browse files
timeFormat tt h:mm not parsed fix by clear00
1 parent fc2531f commit 547e6ad

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

jquery-ui-timepicker-addon.js

+1-1
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)