Skip to main content
Known Participant
April 2, 2013
Question

cfinput type="datefield" giving error with value CF10

  • April 2, 2013
  • 1 reply
  • 1322 views

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

This topic has been closed for replies.

1 reply

Known Participant
April 2, 2013

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