-
Notifications
You must be signed in to change notification settings - Fork 0
/
timePickerSpinner.js
33 lines (33 loc) · 1021 Bytes
/
timePickerSpinner.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
$(function () {
$('#seconds').spinner({
step : 15,
icons: {
down : "ui-icon-minusthick", up: "ui-icon-plusthick"
},
spin: function (event, ui) {
if (ui.value >= 60) {
$(this).spinner('value', ui.value - 60);
$('#minutes').spinner('stepUp');
return false;
} else if (ui.value < 0) {
$(this).spinner('value', ui.value + 60);
$('#minutes').spinner('stepDown');
return false;
}
}
});
$('#minutes').spinner({
icons: {
down : "ui-icon-minusthick", up: "ui-icon-plusthick"
},
spin: function (event, ui) {
if (ui.value >= 45) {
$(this).spinner('value', 45);
return false;
} else if (ui.value < 0) {
$(this).spinner('value', 0);
return false;
}
}
});
});