UI datepicker and field focus

UI datepicker and field focus


Is there a way of ensuring the field focus is not lost when a date is
selected with the datepicker?
Once a date is selected with the UI datepicker, the focus on the date
field is lost (presuming the pop-up was revealed on focus).
This is causing a few problems for me:
- hitting the Tab key to move to the next field in the form
doesn't work (the focus starts back at the top of the page)
- the blur function I have bound to the field is not firing.
I tried adding a function to onSelect: which refocussed the field -
this worked, but of course it reopens the datepicker dialog <slaps
forehead> (in IE anyway).
PS
It will become necessary to make the widget appear onclick, as focus
is not fired by clicking into an already focussed field. Fortunately
this is as simply added to the jQuery chain on the field in question:
.bind('click',function(){$.datepicker.showFor(this);})
Besides this issue, it's working beautifully.
Big thanks to everyone who contributed to this most excellent plugin!
Cheers
Ollie