Copy link to clipboard
Copied
I have a form that was working in CF9 but now that I've moved over to CF10, it is generating an error.
<cfinput type="datefield" mask="mm/dd/yyyy" name="dtfiled" required="yes" message="Enter the date the " value="#DateFormat(dtfiled,"mm/dd/yyyy")#">
I had it working without the mask, but tried it to see if it would fix the problem.
I am getting the error: 10/19/2011 is an invalid date or time string.
If I'm displaying the date as month day year, then the date as it is displayed is correct.
Am I missing something or has something changed between CF9 and CF10?
Thanks.
Sue
Copy link to clipboard
Copied
Strangely, I found another form where it wasn't generating an error ... using the code:
<cfinput type="datefield" name="startdate" value="#DateFormat(startdate,"yyyy-mm-dd")#">
It actually displays as mm/dd/yyyy even though that is not what I've put as the value. I'll change my other form, but this makes no sense to me.
Sue