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

CFINPUT and CFDIRECTORY tags reading dates incorrectly

New Here ,
Nov 26, 2018 Nov 26, 2018

Copy link to clipboard

Copied

Its a new setup on my laptop, all configuration is exact similar to prior. I see an issue now with cfinput type datefield 11/30/2018 is an invalid date or time string. i have tried changing system date and time to mm/dd/yyyy format. Reinstalling Coldfusion multiple times.

Someone please suggest whats wrong here ? As the same set of code works on other systems.

<cfinput type="DateField" class="gcText9pt" name="end_dt" value="#DateFormat(end_dt, "mm/dd/yyyy")#" required="Yes" validate="USdate" size="10" maxlength="16" message="Enter a valid Fiscal End Date (e.g. mm/dd/yyyy )" mask="mm/dd/yyyy">

Views

375

Translate

Translate

Report

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 Expert ,
Nov 26, 2018 Nov 26, 2018

Copy link to clipboard

Copied

LATEST

This example should contain what you're looking for:

<cfdump var="#form#">

<cfset end_dt=createdate(2018,11,30)>

<cfset setLocale("en_US")>

<cfform >

<cfinput type="DateField" class="gcText9pt" name="end_dt" value="#DateFormat(end_dt, 'mm/dd/yyyy')#" required="Yes" validate="USdate" size="10" maxlength="16" message="Enter a valid Fiscal End Date (e.g. mm/dd/yyyy )" mask="mm/dd/yyyy">

<cfinput name="sbmt" type="submit" value="send">

</cfform>

Votes

Translate

Translate

Report

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
Documentation