I have an application where I have multiple date fields. All of these fields are datepicker.
This application also have some processes where it updates automaticly the value of these fields using
$('#selector').datepicker('setDate', aDate);
The problem is when the focus is on another field and the calendar is opened, it's sets the date to the last 'selector' called by the setDate method...
Here is a jsFiddle that reproduces the problem I am facing.
To reproduce the problem.
- Run the jsFiddle
- Click on the first input field (the calendar opens)
- Wait until the 3rd input field is populated with the current date (about 5secs)
- Select a date.
- --->Problem, the selected date updated into the 3rd field...
Any way to avoid this?