2
2
* jQuery timepicker addon
3
3
* By: Trent Richardson [http://trentrichardson.com]
4
4
* Version 0.9.2-dev
5
- * Last Modified: 12/13 /2010 by Charles Phillips
5
+ * Last Modified: 12/17 /2010
6
6
*
7
7
* Copyright 2010 Trent Richardson
8
8
* Dual licensed under the MIT and GPL licenses.
@@ -58,10 +58,8 @@ function Timepicker() {
58
58
hourMax : 23 ,
59
59
minuteMax : 59 ,
60
60
secondMax : 59 ,
61
-
62
61
minDateTime : null ,
63
- maxDateTime : null ,
64
-
62
+ maxDateTime : null ,
65
63
hourGrid : 0 ,
66
64
minuteGrid : 0 ,
67
65
secondGrid : 0 ,
@@ -185,7 +183,7 @@ $.extend(Timepicker.prototype, {
185
183
// the time should come after x number of characters and a space.
186
184
// x = at least the length of text specified by the date format
187
185
var dp_dateFormat = $ . datepicker . _get ( this . inst , 'dateFormat' ) ;
188
- regstr = '.{' + dp_dateFormat . length + ',}\\s*? ' + regstr ;
186
+ regstr = '.{' + dp_dateFormat . length + ',}\\s*' + regstr ;
189
187
}
190
188
191
189
treg = timeString . match ( new RegExp ( regstr , 'i' ) ) ;
@@ -598,7 +596,6 @@ $.extend(Timepicker.prototype, {
598
596
if ( dp_inst . lastVal !== undefined && ( dp_inst . lastVal . length > 0 && this . $input . val ( ) . length === 0 ) )
599
597
return ;
600
598
601
- < << << << HEAD
602
599
if ( this . _defaults . timeOnly === true ) {
603
600
formattedDateTime = this . formattedTime ;
604
601
if ( this . $altInput ) {
@@ -607,18 +604,12 @@ $.extend(Timepicker.prototype, {
607
604
} else if ( this . _defaults . timeOnly !== true && ( this . _defaults . alwaysSetTime || timeAvailable ) ) {
608
605
if ( this . $altInput ) {
609
606
if ( this . _defaults . timeOnly !== true ) {
610
- this . $altInput . val ( this . $altInput . val ( ) + ' ' + this . formattedTime ) ;
607
+ this . $altInput . val ( this . $altInput . val ( ) + this . _defaults . separator + this . formattedTime ) ;
611
608
} else {
612
609
this . $altInput . val ( this . formattedDateTime ) ;
613
610
}
614
611
}
615
- formattedDateTime += ' ' + this . formattedTime ;
616
- = === ===
617
- if ( this . _defaults . timeOnly === true ) formattedDateTime = this . formattedTime ;
618
- else if ( this . _defaults . timeOnly !== true && ( this . _defaults . alwaysSetTime || timeAvailable ) ) {
619
- if ( this . $altInput ) this . $altInput . val ( this . formattedTime ) ;
620
- else formattedDateTime += this . _defaults . separator + this . formattedTime ;
621
- > >>> >>> michael - simons - master
612
+ formattedDateTime += this . _defaults . separator + this . formattedTime ;
622
613
}
623
614
624
615
this . formattedDateTime = formattedDateTime ;
0 commit comments