I am using JQuery ui with datepicker and when a user tabs on to a field, they appropriately get the calendar pop up.
Subscribe to the onClose or the onSelect event:
$("#someinput").datepicker(
{
// other options goes here
onSelect: function ()
{
// The "this" keyword refers to the input (in this case: #someinput)
this.focus();
}
});
Or in the case of onClose:
$("#someinput").datepicker(
{
onClose: function ()
{
this.focus();
}
});