Copy link to clipboard
Copied
Hi guys what i am looking to do is have 3 drop down menus Day - Month - Year and then some how pre select the date to todays date from the client computer or the server.
Is this possable?
Or other sugesstions welcome.
Thanks
Jonathan Hemmings
Copy link to clipboard
Copied
date picker :
<cfinput name="stDate" type="datefield" mask="mm/dd/yyyy" value="#dateformat(now())#"/>
Copy link to clipboard
Copied
Still a bit confuesed could you help? what do i do with
that?
Copy link to clipboard
Copied
put it between
<cfform>
</cfform>
and see what happens ...
and if u MUST have 3 dropdowns ... here is a link to a VERY old CF tag aof mine ... there is an example in the ZIP file
http://www.adobe.com/cfusion/exchange/index.cfm?event=extensionDetail&extid=1000227#
Copy link to clipboard
Copied
Thanks for your help mate. It does not have to have 3 drop downs i just thourght that would be the best way. what would you recomend?
Copy link to clipboard
Copied
i get this error when i put it between cfform:
The web site you are accessing has experienced an unexpected error.
Please contact the website administrator.
The following information is meant for the website developer for debugging purposes.
Error Occurred While Processing Request
05-May-11 is an invalid date or time string
Copy link to clipboard
Copied
Coldfusion error messages are pretty clear ...
so the error is telling us the date format is wroung ...
there for :
<cfform>
<cfinput name="stDate" type="datefield" mask="mm/dd/yyyy" value="#dateformat(now(),'mm/dd/yyyy')#"/>
</cfform>
Copy link to clipboard
Copied
cfselect has a selected attribute. That's how I'd do it. Also, I'd use the date from the server unless there was a really compelling reason to attempt to get it from the client.