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 37
37
hour : 0 ,
38
38
minute : 0 ,
39
39
second : 0 ,
40
+ hourMin : 0 ,
41
+ minuteMin : 0 ,
42
+ secondMin : 0 ,
43
+ hourMax : 23 ,
44
+ minuteMax : 59 ,
45
+ secondMax : 59 ,
40
46
alwaysSetTime : true
41
47
} ;
42
48
$ . extend ( this . defaults , this . regional [ '' ] ) ;
149
155
// Added by Peter Medeiros:
150
156
// - Figure out what the hour/minute/second max should be based on the step values.
151
157
// - 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 ) ;
155
161
156
162
// Prevent displaying twice
157
163
if ( $dp . find ( "div#ui-timepicker-div" ) . length === 0 ) {
181
187
tp_inst . hour_slider = $tp . find ( '#ui_tpicker_hour' ) . slider ( {
182
188
orientation : "horizontal" ,
183
189
value : tp_inst . hour ,
184
- min : 0 ,
190
+ min : opts . hourMin ,
185
191
max : hourMax ,
186
192
step : opts . stepHour ,
187
193
slide : function ( event , ui ) {
195
201
tp_inst . minute_slider = $tp . find ( '#ui_tpicker_minute' ) . slider ( {
196
202
orientation : "horizontal" ,
197
203
value : tp_inst . minute ,
198
- min : 0 ,
204
+ min : opts . minuteMin ,
199
205
max : minMax ,
200
206
step : opts . stepMinute ,
201
207
slide : function ( event , ui ) {
208
214
tp_inst . second_slider = $tp . find ( '#ui_tpicker_second' ) . slider ( {
209
215
orientation : "horizontal" ,
210
216
value : tp_inst . second ,
211
- min : 0 ,
217
+ min : opts . secondMin ,
212
218
max : secMax ,
213
219
step : opts . stepSecond ,
214
220
slide : function ( event , ui ) {
You can’t perform that action at this time.
0 commit comments