I am trying to have the scroller open with a time value set conditionally. when the text input box is = 0 then set mobiscroll to value of 0. It appears that it defaults to 12 when input value is 0. I tried many approaches this is the closest I got...
$(function () {
$('.in').scroller({
preset: 'time',
theme: 'default',
display: 'modal',
mode: 'mixed',
stepMinute: 15,
timeWheels: 'hhii',
ampm: false,
ampmText: false,
timeFormat: 'hh:ii',
onShow: function (valueText, inst) {
scrollerVals = inst.temp;
if ($(this).val() == "0" || $(this).val == null || $(this).val == "") {
$(this).scroller().scroller('setValue', ['1', '0'])
}
}
});
but it doesn't work. Any suggestions would be appreciated.