How to change Calendar selected date in ColdFusion

cfcalendar - set change selected date

cfcalendarSelectedDate.cfm


<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>cfcalendar tag: how to set change selected date in calendar in coldfusion</title>
</head>

<body>
<h2 style="color:Crimson; font-style:italic">cfcalendar tag example: how to use selecteddate attribute</h2>
<hr width="575" align="left" color="Crimson" />
<br />

<cfif IsDefined("Form.SubmitConferenceDate")>
 <cfoutput>
  <h3 style="color:SaddleBrown;">
      Next Conference Date Is: #DateFormat(Form.ConferenceDate)#
  </h3>
    </cfoutput>
</cfif>

<cfform name="CalendarSelectedDateTest" method="post" format="html">
 <table border="1" cellpadding="5" cellspacing="0" bordercolor="Crimson">
     <tr>
         <td colspan="2" bgcolor="IndianRed" style="color:Snow; font-size:large" align="center">
             Conference Date Submit Form
            </td>
        </tr>
     <tr valign="top">
         <td style="color:IndianRed; font-weight:bold">
             Next Conference Date
            </td>
         <td >
             <cfcalendar 
                 name="ConferenceDate" 
                    selecteddate="#DateAdd('d',5,Now())#"
                     />
            </td>
        </tr>
     <tr>
         <td colspan="2" align="right">
       <cfinput 
                 name="SubmitConferenceDate" 
                    type="submit" 
                    value="Submit Date"
                    style="height:45px; width:150px; font-size:large; font-style:italic; font-weight:bold; color:IndianRed;"
                    >
            </td>
        </tr>
    </table>
</cfform>

</body>
</html>









More ColdFusion examples