I’ve 2 textboxes, date1 and date2 (‘from’, ‘to’).
When the user select a date from first textbox, second one should automatically opens (after first hides). I’ve set $('#date2').focus in first onSelect event; it works, but after second datepicker shows, it hides immediately.. check it here
What’s the problem? and a solution.
Can’t find an exact solution to your problem, but seems like some event fires that causes the datepicker to close. If you try and put the
focus()call after a timeout, seems to be working (see this fiddle).I don’t know if it suits your needs, maybe this could help you identify the issue that causes the problem…