File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed
Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -524,9 +524,14 @@ $.extend(Timepicker.prototype, {
524524 _onTimeChange : function ( ) {
525525 var hour = ( this . hour_slider ) ? this . hour_slider . slider ( 'value' ) : false ,
526526 minute = ( this . minute_slider ) ? this . minute_slider . slider ( 'value' ) : false ,
527- second = ( this . second_slider ) ? this . second_slider . slider ( 'value' ) : false ,
528- ampm = ( hour < 12 ) ? 'AM' : 'PM' ;
529-
527+ second = ( this . second_slider ) ? this . second_slider . slider ( 'value' ) : false ;
528+
529+ if ( hour ) hour = parseFloat ( hour ) . toFixed ( 0 ) ;
530+ if ( minute ) minute = parseFloat ( minute ) . toFixed ( 0 ) ;
531+ if ( second ) second = parseFloat ( second ) . toFixed ( 0 ) ;
532+
533+ var ampm = ( hour < 12 ) ? 'AM' : 'PM' ;
534+
530535 // If the update was done in the input field, the input field should not be updated.
531536 // If the update was done using the sliders, update the input field.
532537 var hasChanged = ( hour != this . hour || minute != this . minute || second != this . second || ( this . ampm . length > 0 && this . ampm != ampm ) ) ;
You can’t perform that action at this time.
0 commit comments