PaulM
11-30-2008, 09:52 PM
1) Script Title: Jason's Date Input Calendar
2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex7/jasoncalendar.htm
3) Describe problem: I've been using this script for a long time and it is brilliant. There is just one refinement I would like to include, but I'm getting nowhere trying to work it out for myself.
I use the script on a hotel booking form so there are two inputs on the same same form: Arrival Date and Departure Date. It is currently set up with the default which shows the current date, until the user changes it. Unfortunately, a significant number of users fill in the departure date incorrectly because they don't change the month.
For instance, if today is 1 Jan 2009, that is what shows in both fields when the page first comes up. The user then changes the arrival date to 3 Feb 2009 and wants to stay at the hotel for a week. They then go to the departure date and change the day to "10", which then gives the departure date as 10 Jan 2009. Wrong!
I would like to make the script operate so that once the arrival date is filled in, the departure date changes from current date to arrival date. I've tried various ideas but being a javascript numpty, I haven't yet made it work. Any ideas, anyone?
2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex7/jasoncalendar.htm
3) Describe problem: I've been using this script for a long time and it is brilliant. There is just one refinement I would like to include, but I'm getting nowhere trying to work it out for myself.
I use the script on a hotel booking form so there are two inputs on the same same form: Arrival Date and Departure Date. It is currently set up with the default which shows the current date, until the user changes it. Unfortunately, a significant number of users fill in the departure date incorrectly because they don't change the month.
For instance, if today is 1 Jan 2009, that is what shows in both fields when the page first comes up. The user then changes the arrival date to 3 Feb 2009 and wants to stay at the hotel for a week. They then go to the departure date and change the day to "10", which then gives the departure date as 10 Jan 2009. Wrong!
I would like to make the script operate so that once the arrival date is filled in, the departure date changes from current date to arrival date. I've tried various ideas but being a javascript numpty, I haven't yet made it work. Any ideas, anyone?