Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Date drop down menu

Guest
May 05, 2011 May 05, 2011

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

1.5K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
May 05, 2011 May 05, 2011

date picker :

<cfinput name="stDate" type="datefield" mask="mm/dd/yyyy" value="#dateformat(now())#"/>

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
May 05, 2011 May 05, 2011

Still a bit confuesed could you help? what do i do with

that?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
May 05, 2011 May 05, 2011

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#

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
May 05, 2011 May 05, 2011

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?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
May 05, 2011 May 05, 2011

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
May 05, 2011 May 05, 2011

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>

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
May 05, 2011 May 05, 2011
LATEST

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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources