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

CFINPUT dateField with onChange

New Here ,
Oct 04, 2006 Oct 04, 2006

Copy link to clipboard

Copied

Consider the following basic code that works with handling a selectedDate:

<!--- Set initial dates.--->
<cfparam name="Form.selectdate" default="#dateformat(now(), 'mm/dd/yyyy')#">

<!--- Display the current date value. --->
<cfif isDefined("Form.submitit")>
<cfoutput><b>You selected #Form.selectDate#</b><br><br></cfoutput>
<cfelse>
<cfoutput><b>Form date is #Form.selectDate#</b><br><br></cfoutput>
</cfif>

<b>Please select a date on the calendar and click Save.</b><br>
<br>
<cfform name="form1" format="Flash" skin="haloBlue" width="375" height="350" >
<cfinput type="dateField"
name="selectdate"
label="Initial date"
width="100"
value="#Form.selectdate#" >
<cfinput type="Submit" name="submitit" value="Save" width="100">
</cfform>

I would like to accomplish the same thing but use onChange instead of a submit.
TOPICS
Advanced techniques

Views

423

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
Participant ,
Oct 16, 2006 Oct 16, 2006

Copy link to clipboard

Copied

LATEST
Look for a cf datepicker component from Massimo Foti (Google), then write the necessary js to change the innerHTML of a specified span element onchange.

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