File tree Expand file tree Collapse file tree 1 file changed +12
-6
lines changed
Expand file tree Collapse file tree 1 file changed +12
-6
lines changed Original file line number Diff line number Diff line change 3737 hour : 0 ,
3838 minute : 0 ,
3939 second : 0 ,
40+ hourMin : 0 ,
41+ minuteMin : 0 ,
42+ secondMin : 0 ,
43+ hourMax : 23 ,
44+ minuteMax : 59 ,
45+ secondMax : 59 ,
4046 alwaysSetTime : true
4147 } ;
4248 $ . extend ( this . defaults , this . regional [ '' ] ) ;
149155 // Added by Peter Medeiros:
150156 // - Figure out what the hour/minute/second max should be based on the step values.
151157 // - Example: if stepMinute is 15, then minMax is 45.
152- var hourMax = 23 - ( 23 % opts . stepHour ) ;
153- var minMax = 59 - ( 59 % opts . stepMinute ) ;
154- var secMax = 59 - ( 59 % opts . stepSecond ) ;
158+ var hourMax = opts . hourMax - ( opts . hourMax % opts . stepHour ) ;
159+ var minMax = opts . minuteMax - ( opts . minuteMax % opts . stepMinute ) ;
160+ var secMax = opts . secondMax - ( opts . secondMax % opts . stepSecond ) ;
155161
156162 // Prevent displaying twice
157163 if ( $dp . find ( "div#ui-timepicker-div" ) . length === 0 ) {
181187 tp_inst . hour_slider = $tp . find ( '#ui_tpicker_hour' ) . slider ( {
182188 orientation : "horizontal" ,
183189 value : tp_inst . hour ,
184- min : 0 ,
190+ min : opts . hourMin ,
185191 max : hourMax ,
186192 step : opts . stepHour ,
187193 slide : function ( event , ui ) {
195201 tp_inst . minute_slider = $tp . find ( '#ui_tpicker_minute' ) . slider ( {
196202 orientation : "horizontal" ,
197203 value : tp_inst . minute ,
198- min : 0 ,
204+ min : opts . minuteMin ,
199205 max : minMax ,
200206 step : opts . stepMinute ,
201207 slide : function ( event , ui ) {
208214 tp_inst . second_slider = $tp . find ( '#ui_tpicker_second' ) . slider ( {
209215 orientation : "horizontal" ,
210216 value : tp_inst . second ,
211- min : 0 ,
217+ min : opts . secondMin ,
212218 max : secMax ,
213219 step : opts . stepSecond ,
214220 slide : function ( event , ui ) {
You can’t perform that action at this time.
0 commit comments