Drop down date updated with todays date

lw_d 28 Mar, 2009
Hi there,

I have a form field whereby, the user selects a date (day, month and year), if possible, I would like to update the date drop down with today's date, so they cannot select a date in the past, even better would be to add 7 days to the date, is there anyway to add this functionality to my form using CF?

Thanks
lw_d 28 Mar, 2009
Actually got a nice calendar using:

<?php JHTML::_('behavior.calendar'); ?>
<input type="text" name="launchDate" id="launchDate" value="" />
<img class="calendar" src="images/calendar.png" alt="calendar" onclick="return showCalendar('launchDate', '%d-%m-%Y');" />

Thanks to some tips on this forum. However, is there any way that that the calendar can pop up when they click on the input field, as well as the calendar, currently its just the calendar icon?

Thanks
nml375 28 Mar, 2009
I suppose you could try to add some "onClick" event to your input field:
...
<input type="text" name="launchDate" id="launchDate" value="" onClick="return showCalendar('launchDate', '%d-%m-%Y');" />
...
This topic is locked and no more replies can be posted.