[jQuery] Opening the datePicker plugin when you tab or click on the text field
Hi,
a co-worker asked how can they open the datePicker plugin
if a user tabs or clicks on the input date field. I have a solution , my question is if its ok? Is there a better solution?
My solution
1. add an onfocus event handler for the input field
<input type="text" class="date-picker" name="date1" id="date1" value="" onfocus="myFunc(this);"/>
2. The myFunc() handler will open the date picker
function myFunc(input) {
var a = input.nextSibling;
$(a).click();
}
Thanks
_______________________________________________
_______________________________________________
jQuery mailing list
discuss@jquery.com
http://jquery.com/discuss/