@@ -61,7 +61,8 @@ function Timepicker() {
61
61
hourGrid : 0 ,
62
62
minuteGrid : 0 ,
63
63
secondGrid : 0 ,
64
- alwaysSetTime : true
64
+ alwaysSetTime : true ,
65
+ separator : ' '
65
66
} ;
66
67
$ . extend ( this . _defaults , this . regional [ '' ] ) ;
67
68
}
@@ -159,7 +160,7 @@ $.extend(Timepicker.prototype, {
159
160
// parse the time string from input value or _setTime
160
161
//########################################################################
161
162
_parseTime : function ( timeString , withDate ) {
162
- var regstr = this . _defaults . timeFormat . toString ( )
163
+ var regstr = this . _defaults . separator + this . _defaults . timeFormat . toString ( )
163
164
. replace ( / h { 1 , 2 } / ig, '(\\d?\\d)' )
164
165
. replace ( / m { 1 , 2 } / ig, '(\\d?\\d)' )
165
166
. replace ( / s { 1 , 2 } / ig, '(\\d?\\d)' )
@@ -173,7 +174,7 @@ $.extend(Timepicker.prototype, {
173
174
// the time should come after x number of characters and a space.
174
175
// x = at least the length of text specified by the date format
175
176
var dp_dateFormat = $ . datepicker . _get ( this . inst , 'dateFormat' ) ;
176
- regstr = '.{' + dp_dateFormat . length + ',}\\s+ ' + regstr ;
177
+ regstr = '.{' + dp_dateFormat . length + ',}\\s*? ' + regstr ;
177
178
}
178
179
179
180
if ( treg ) {
@@ -519,7 +520,7 @@ $.extend(Timepicker.prototype, {
519
520
if ( this . _defaults . timeOnly === true ) formattedDateTime = this . formattedTime ;
520
521
else if ( this . _defaults . timeOnly !== true && ( this . _defaults . alwaysSetTime || timeAvailable ) ) {
521
522
if ( this . $altInput ) this . $altInput . val ( this . formattedTime ) ;
522
- else formattedDateTime += ' ' + this . formattedTime ;
523
+ else formattedDateTime += this . _defaults . separator + this . formattedTime ;
523
524
}
524
525
525
526
this . formattedDateTime = formattedDateTime ;
0 commit comments