Copy link to clipboard
Copied
I've got a couple of cfinput datefields that show the current month when you select the calendar icon. Because these fields are used to select the "From" and "To" dates for reports, I need the calendar to actually show dates in the past. It would be great if one click would show the previous three months.
Can that be done?
Copy link to clipboard
Copied
Why not just put in the date three months ago, as default. Something like this
<cfdump var="#form#">
<cfset dateThreeMonthsAgo = dateformat(dateAdd('m',-3,now()),'dd/mm/yyyy')>
<cfform>
<div>
Date: <cfinput name="dt" type="datefield" value="#dateThreeMonthsAgo#">
</div>
<cfinput type="submit" name="sbmt" value="Send">
</cfform>