Closed GoogleCodeExporter closed 8 years ago
$('#your_scroller').scroller('setValue', [1, 6, 7, 2 /* ... */]);
Where [1, 6, 7, 2] is an array with the values to be selected (not the labels).
Original comment by diosla...@gmail.com
on 3 Jan 2012 at 7:11
Thank for your help, but I couldn´t do it.
I set de wheels arrays so:
var hoursList = [];
var minutesList = [];
for (var i = 0; i < 100; i++) {
if (i < 10) {
hoursList.push('0' + i.toString());
minutesList.push('0' + i.toString());
} else {
if (i < 60) {
minutesList.push(i.toString());
}
hoursList.push(i.toString());
}
}
var wheels = [{
'Horas': hoursList,
'Minutos': minutesList
}];
And then, I did so:
$('#hourQuantity').scroller('setValue', [10, 20]);
But the value is still 00:00
What can I do?
Tahnks
Original comment by santy...@gmail.com
on 3 Jan 2012 at 10:17
You have to put the numbers in quotes, like so:
$('#hourQuantity').scroller('setValue', ["10", "20"]);
Original comment by a.w.ha...@gmail.com
on 26 Apr 2012 at 7:59
Original issue reported on code.google.com by
santy...@gmail.com
on 2 Jan 2012 at 4:37