Skip to content
Advertisement

Datepicker flashes and disappears after field receives focus

I have an html page that displays a modal dialog with two jquery datepicker fields. When the dialog is instantiated, the cursor is properly placed in the first datepicker field and the calendar is displayed.

Upon selection of a date, focus is moved to the second datepicker field. The calendar flashes but disappears.

How do I correct this?

The code is below. I have added no html formatting, so when the code runs it will be ugly. Pick a date and you will see the date picker calendar, for the to date field, display and disappear.

Any help would be greatly appreciated.

JavaScript

Advertisement

Answer

you can fix it by delaying the focus event like this:

JavaScript
User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement