File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed
Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -537,9 +537,9 @@ $.extend(Timepicker.prototype, {
537537 minute = ( this . minute_slider ) ? this . minute_slider . slider ( 'value' ) : false ,
538538 second = ( this . second_slider ) ? this . second_slider . slider ( 'value' ) : false ;
539539
540- if ( hour ) hour = parseFloat ( hour ) . toFixed ( 0 ) ;
541- if ( minute ) minute = parseFloat ( minute ) . toFixed ( 0 ) ;
542- if ( second ) second = parseFloat ( second ) . toFixed ( 0 ) ;
540+ if ( hour !== false ) hour = parseInt ( hour , 10 ) ;
541+ if ( minute !== false ) minute = parseInt ( minute , 10 ) ;
542+ if ( second !== false ) second = parseInt ( second , 10 ) ;
543543
544544 var ampm = ( hour < 12 ) ? 'AM' : 'PM' ;
545545
@@ -549,12 +549,12 @@ $.extend(Timepicker.prototype, {
549549
550550 if ( hasChanged ) {
551551
552- if ( hour ) {
553- this . hour = parseFloat ( hour ) . toFixed ( 0 ) ;
552+ if ( hour !== false ) {
553+ this . hour = hour ;
554554 if ( this . _defaults . ampm ) this . ampm = ampm ;
555555 }
556- if ( minute ) this . minute = parseFloat ( minute ) . toFixed ( 0 ) ;
557- if ( second ) this . second = parseFloat ( second ) . toFixed ( 0 ) ;
556+ if ( minute !== false ) this . minute = minute ;
557+ if ( second !== false ) this . second = second ;
558558
559559 }
560560 this . _formatTime ( ) ;
You can’t perform that action at this time.
0 commit comments