File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -180,7 +180,7 @@ $.extend(Timepicker.prototype, {
180
180
// parse the time string from input value or _setTime
181
181
//########################################################################
182
182
_parseTime : function ( timeString , withDate ) {
183
- var regstr = this . _defaults . separator + this . _defaults . timeFormat . toString ( )
183
+ var regstr = this . _defaults . timeFormat . toString ( )
184
184
. replace ( / h { 1 , 2 } / ig, '(\\d?\\d)' )
185
185
. replace ( / m { 1 , 2 } / ig, '(\\d?\\d)' )
186
186
. replace ( / s { 1 , 2 } / ig, '(\\d?\\d)' )
@@ -195,7 +195,7 @@ $.extend(Timepicker.prototype, {
195
195
// the time should come after x number of characters and a space.
196
196
// x = at least the length of text specified by the date format
197
197
var dp_dateFormat = $ . datepicker . _get ( this . inst , 'dateFormat' ) ;
198
- regstr = '.{' + dp_dateFormat . length + ',}\\s*' + regstr ;
198
+ regstr = '.{' + dp_dateFormat . length + ',}\\s*' + this . _defaults . separator . replace ( / \s / g , '\\s?' ) + regstr ;
199
199
}
200
200
201
201
treg = timeString . match ( new RegExp ( regstr , 'i' ) ) ;
You can’t perform that action at this time.
0 commit comments