I am using mobiscroll 2.0 and making 2 custom wheels one having numbers 0 to 23 and other having numbers 0 to 99 i want that the single digit numbers that is form 0 to 9 should have a leading 0 in front of them. How can i do it?
Asked
Active
Viewed 323 times
1 Answers
1
Try this demo:
http://jsfiddle.net/S5p6j/1/
You have to define custom wheels.
<input ID="mobiscroll" />
$(function(){
var whl1 = {'0':'0',
'1':'1',
'2':'3',
'4':'4',
'5':'5'
};
var whl2 = {'11':'11',
'12':'12',
'13':'13',
'14':'14',
'15':'15'};
var wheel = [{},{}];
wheel[0]['Wheel1'] = whl1;
wheel[1]['Wheel2'] = whl2;
$('#mobiscroll').scroller({
wheels: wheel
});
});

charino
- 584
- 5
- 7