File tree 1 file changed +14
-4
lines changed 1 file changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -597,10 +597,20 @@ $.extend(Timepicker.prototype, {
597
597
if ( dp_inst . lastVal !== undefined && ( dp_inst . lastVal . length > 0 && this . $input . val ( ) . length === 0 ) )
598
598
return ;
599
599
600
- if ( this . _defaults . timeOnly === true ) formattedDateTime = this . formattedTime ;
601
- else if ( this . _defaults . timeOnly !== true && ( this . _defaults . alwaysSetTime || timeAvailable ) ) {
602
- if ( this . $altInput ) this . $altInput . val ( this . formattedTime ) ;
603
- else formattedDateTime += ' ' + this . formattedTime ;
600
+ if ( this . _defaults . timeOnly === true ) {
601
+ formattedDateTime = this . formattedTime ;
602
+ if ( this . $altInput ) {
603
+ this . $altInput . val ( this . formattedDateTime ) ;
604
+ }
605
+ } else if ( this . _defaults . timeOnly !== true && ( this . _defaults . alwaysSetTime || timeAvailable ) ) {
606
+ if ( this . $altInput ) {
607
+ if ( this . _defaults . timeOnly !== true ) {
608
+ this . $altInput . val ( this . $altInput . val ( ) + ' ' + this . formattedTime ) ;
609
+ } else {
610
+ this . $altInput . val ( this . formattedDateTime ) ;
611
+ }
612
+ }
613
+ formattedDateTime += ' ' + this . formattedTime ;
604
614
}
605
615
606
616
this . formattedDateTime = formattedDateTime ;
You can’t perform that action at this time.
0 commit comments