@@ -590,9 +590,12 @@ $.extend(Timepicker.prototype, {
590590 minMax = ( this . _defaults . minuteMax - ( this . _defaults . minuteMax % this . _defaults . stepMinute ) ) . toFixed ( 0 ) ,
591591 secMax = ( this . _defaults . secondMax - ( this . _defaults . secondMax % this . _defaults . stepSecond ) ) . toFixed ( 0 ) ;
592592
593- this . hour_slider . slider ( "option" , { min : this . _defaults . hourMin , max : hourMax } ) . slider ( 'value' , this . hour ) ;
594- this . minute_slider . slider ( "option" , { min : this . _defaults . minuteMin , max : minMax } ) . slider ( 'value' , this . minute ) ;
595- this . second_slider . slider ( "option" , { min : this . _defaults . secondMin , max : secMax } ) . slider ( 'value' , this . second ) ;
593+ if ( this . hour_slider )
594+ this . hour_slider . slider ( "option" , { min : this . _defaults . hourMin , max : hourMax } ) . slider ( 'value' , this . hour ) ;
595+ if ( this . minute_slider )
596+ this . minute_slider . slider ( "option" , { min : this . _defaults . minuteMin , max : minMax } ) . slider ( 'value' , this . minute ) ;
597+ if ( this . second_slider )
598+ this . second_slider . slider ( "option" , { min : this . _defaults . secondMin , max : secMax } ) . slider ( 'value' , this . second ) ;
596599 }
597600
598601 } ,
@@ -629,6 +632,9 @@ $.extend(Timepicker.prototype, {
629632 if ( minute !== false ) this . minute = minute ;
630633 if ( second !== false ) this . second = second ;
631634 if ( timezone !== false ) this . timezone = timezone ;
635+
636+ if ( ! this . inst ) this . inst = $ . datepicker . _getInst ( this . $input [ 0 ] ) ;
637+
632638 this . _limitMinMaxDateTime ( this . inst , true ) ;
633639 }
634640 if ( this . _defaults . ampm ) this . ampm = ampm ;
0 commit comments