Fix regex parsing with separator option

This commit is contained in:
Trent Richardson 2011-01-05 10:00:57 -05:00
parent faec5be2c6
commit 44fc32ab44

View file

@ -194,7 +194,7 @@ $.extend(Timepicker.prototype, {
// the time should come after x number of characters and a space.
// x = at least the length of text specified by the date format
var dp_dateFormat = $.datepicker._get(this.inst, 'dateFormat');
regstr = '.{' + dp_dateFormat.length + ',}\\s*' + this._defaults.separator + regstr;
regstr = '.{' + dp_dateFormat.length + ',}' + this._defaults.separator + regstr;
}
treg = timeString.match(new RegExp(regstr, 'i'));