I got a jquery date selector from internet and the script was like this…
<script type="text/javascript">
$(document).ready(function () {
$("#date3").click(function(){
$("#date3").scroller({ preset: 'datetime' });
wheels = [];
wheels[0] = { 'Hours': {} };
wheels[1] = { 'Minutes': {} };
for (var i = 0; i < 60; i++) {
if (i < 16) wheels[0]['Hours'][i] = (i < 10) ? ('0' + i) : i;
wheels[1]['Minutes'][i] = (i < 10) ? ('0' + i) : i;
}
});
});
</script>
My problem is that when i first click the input textbox, it doesn’t work.
I’ve to click on the textbox first, click somewhere else in the page, and then again click on the textbox to make it work. Is there any way to solve it?
If you want to solve without change your code you can do like this:–
when your page will load it will work fine now..