Setting the Date in a Drop Down Menu
Moderator: General Moderators
Setting the Date in a Drop Down Menu
I am writing some code that will fill 6 total menu boxes. The first 3 are for a reservation date. I have the code written to generate that dates and get the correct selected value. What I am wondering is is there a way to get the next three boxes to fill by reading 2 days from the selected date. For example, in the check in date boxes, if the selected date is June 30, 2009, I want the last three boxes to read July 2, 2009. And if the check in boxes are changed, I want the check out boxes to add 2 days to the date in the check in boxes.
-
BornForCode
- Forum Contributor
- Posts: 147
- Joined: Mon Feb 11, 2008 1:56 am
Re: Setting the Date in a Drop Down Menu
This can be done easy, you have to use JavaScript for this (is not PHP related).
The other 3 boxes options have to be recreated based on the onchange event from the main ones.
The other 3 boxes options have to be recreated based on the onchange event from the main ones.