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

cfinput type="datefield" giving error with value CF10

Community Beginner ,
Apr 02, 2013 Apr 02, 2013

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

1.3K
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
Community Beginner ,
Apr 02, 2013 Apr 02, 2013
LATEST

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

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