Highlighted

CFINPUT and CFDIRECTORY tags reading dates incorrectly

New Here ,
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

281

Likes

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

CFINPUT and CFDIRECTORY tags reading dates incorrectly

New Here ,
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

282

Likes

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
Nov 26, 2018 0
BKBK LATEST
Adobe Community Professional ,
Nov 26, 2018

Copy link to clipboard

Copied

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>

Likes

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
Reply
Loading...
Nov 26, 2018 0