Hi Sam, Sam Collett wrote: > At the moment, the date picker plugin > (http://kelvinluck.com/assets/jquery/datePicker/) uses an anchor added > after the input to show the calendar. What I wanted to do is show it > when I clicked on the input instead. > > Also I think it is good practice to add events after adding an element > to the DOM (adding before can cause memory leaks in IE IIRC), so I > have made another tweak to do that. > > The fix is as follows (applied to the uncompressed version): > ... > To use: > $('input#date1').datePicker({inputClick: true}); > > i.e. add 'inputClick: true' as an option to show the picker when you > click on the input box containing the date.
Thanks for the feedback and the change. I've implemented it in the datePicker in svn... I'm not sure if the functionality is a good thing from an accessibility point of view (e.g. there is no indication to a user that the input will provide a date input and you can't make the calendar pop up by navigating with the keyboard). Then again, the datePicker plugin is far from accessible itself (apart from degrading gracefully) so I'm happy to have the option there for people who want to use it. Cheers, Kelvin :) _______________________________________________ jQuery mailing list [email protected] http://jquery.com/discuss/
