Page 1 of 1

Setting the Date in a Drop Down Menu

Posted: Mon Jun 29, 2009 2:52 pm
by ChadS
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.

Re: Setting the Date in a Drop Down Menu

Posted: Mon Jun 29, 2009 6:19 pm
by BornForCode
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.