CF datefield calendar

CF8 came bundled with a neat feature to create a calendar form element. Snippet: <cfinput type=”datefield” name=”mydate” readonly />


<cfif not isDefined('form.mydate')>
<cform action="thispage.cfm" method="post" preserveData="yes">
<label for="mydate">The Date
<cfinput type="datefield" name="mydate" readonly />
...//other html form elements here
<cfinput type="submit" value="go">
</cform>
<cfelse>
<cfquery name="get_date">
//query stuff here
</cfquery>
//excel would go here using cfheader and cfcontent tags
<cfoutput query="get_date">
#mydate#
<cfoutput>
</cfif>

Cup size   
Select size then click on coffee cup.
This entry was posted in Code, Coldfusion. Bookmark the permalink.