timeFormat tt h:mm not parsed fix by clear00

This commit is contained in:
Trent 2012-01-30 15:32:35 -05:00
parent fc2531ff86
commit 547e6adde3

View file

@ -247,7 +247,7 @@ $.extend(Timepicker.prototype, {
var dp_dateFormat = $.datepicker._get(this.inst, 'dateFormat'); var dp_dateFormat = $.datepicker._get(this.inst, 'dateFormat');
// escape special regex characters in the seperator // escape special regex characters in the seperator
var specials = new RegExp("[.*+?|()\\[\\]{}\\\\]", "g"); var specials = new RegExp("[.*+?|()\\[\\]{}\\\\]", "g");
regstr = '.{' + dp_dateFormat.length + ',}' + this._defaults.separator.replace(specials, "\\$&") + regstr; regstr = '^.{' + dp_dateFormat.length + ',}?' + this._defaults.separator.replace(specials, "\\$&") + regstr;
} }
treg = timeString.match(new RegExp(regstr, 'i')); treg = timeString.match(new RegExp(regstr, 'i'));