I´m trying to add some functionality to a form with JQuery UI´s Datepicker.
When a user selects the arrival date (onSelect), a few things should happen:
Update the departure to 3 days after the arrival date(This works now :))- Split the departure date in 3 and add each part to an input field (see arrival date example in Fiddle)
- When the arrival-datepicker closes (onClose), the departure-datepicker should open automatically, defaulting to the date selected in point 1 (example: http://www.kayak.es )
I managed to get point 1 to work, but I´m a bit lost with the other features. If anyone can show me how to do this or get me on the right track that would be really great! I´m still a beginner but learning fast.
Here´s a Fiddle of what I have now: http://jsfiddle.net/mattvic/B6Kax/13/