cfinput - validate input type datefield
cfinputTypeDateFieldValidate.cfm
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>cfinput type datefield: how to validate input type datefield in coldfusion</title>
</head>
<body>
<h2 style="color:Crimson; font-style:italic">cfinput type datefield example: how to validate</h2>
<hr width="475" align="left" color="Crimson" />
<br />
<cfif IsDefined("Form.SubmitMeetingDate")>
<cfoutput>
<h3 style="color:Crimson;">
Next meeting date is: : #DateFormat(Form.DateChooser)#
</h3>
</cfoutput>
</cfif>
<cfform name="InputTypedateFieldValidation" method="post" format="html">
<table border="1" cellpadding="5" cellspacing="0" bordercolor="Pink">
<tr>
<td colspan="2" bgcolor="HotPink" style="color:Snow; font-size:large" align="center">
Meeting Date Submit Form
</td>
</tr>
<tr valign="top">
<td style="color:RosyBrown; font-weight:bold">
Next meeting Date?
</td>
<td height="250">
<cfinput
name="DateChooser"
type="datefield"
validate="date"
required="yes"
message="Choose a date."
>
</td>
</tr>
<tr>
<td colspan="2" align="right">
<cfinput name="SubmitMeetingDate" type="submit" value="Submit">
</td>
</tr>
</table>
</cfform>
</body>
</html>