File tree 1 file changed +7
-7
lines changed
1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -537,9 +537,9 @@ $.extend(Timepicker.prototype, {
537
537
minute = ( this . minute_slider ) ? this . minute_slider . slider ( 'value' ) : false ,
538
538
second = ( this . second_slider ) ? this . second_slider . slider ( 'value' ) : false ;
539
539
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 ) ;
543
543
544
544
var ampm = ( hour < 12 ) ? 'AM' : 'PM' ;
545
545
@@ -549,12 +549,12 @@ $.extend(Timepicker.prototype, {
549
549
550
550
if ( hasChanged ) {
551
551
552
- if ( hour ) {
553
- this . hour = parseFloat ( hour ) . toFixed ( 0 ) ;
552
+ if ( hour !== false ) {
553
+ this . hour = hour ;
554
554
if ( this . _defaults . ampm ) this . ampm = ampm ;
555
555
}
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 ;
558
558
559
559
}
560
560
this . _formatTime ( ) ;
You can’t perform that action at this time.
0 commit comments