Whatever message this page gives is out now! Go check it out!
<cfcalendar
name = "name of calendar"
dayNames = "days of the week labels"
disabled = "yes|no|no attribute value"
enabled = "yes|no"
endRange = "last disabled date"
height = "height"
mask = "character pattern"
monthNames = "month labels"
onBlur = "ActionScript to invoke"
onChange = "ActionScript to invoke"
onFocus = "ActionScript to invoke"
selectedDate = "date"
startRange = "first disabled date"
style="Flash ActionScript style"
tooltip = "text"
visible = "yes|no"
width = "width">Attribute | Req/Opt | Default | Description |
name | Required | The name of the calendar. | |
dayNames | Optional | S, M, T, W, Th, F, S | A comma-delimited list that sets the names of the weekdays displayed in the calendar. Sunday is the first day and the rest of the weekday names follow in the normal order. |
disabled | Optional | Not disabled | Disables all user input, making the control read-only. To disable input, specify disabled without an attribute or disabled="Yes" (or any ColdFusion positive boolean value, such as true). To enable input, omit the attribute or specify disabled="No" (or any ColdFusion negative Boolean value, such as false). |
enabled | Optional | yes | Flash only: Boolean value that specifies whether the control is enabled. A disabled control appears in light gray. This is the inverse of the disabled attribute. |
endRange | Optional | The end of a range of dates that are disabled. Users cannot select dates from the date specified by the startRange attribute through this date. | |
firstDayOfWeek | Optional | 0 | Integer in the range 0-6 specifying the first day of the week in the calendar: 0 indicates Sunday; 6 indicates Saturday. |
height | Optional | Determined by Flash | The vertical dimension of the calendar specified in pixels. |
mask | Optional | MM/DD/YYYY | A pattern that specifies the format of the submitted date. Mask characters are:
|
monthNames | Optional | January, February, March, April, May, June, July, August, September, October, November, December | A comma-delimited list of the month names that are displayed at the top of the calendar. |
onBlur | Optional | ActionScript that runs when the calendar loses focus. | |
onChange | Optional | ActionScript that runs when the user selects a date. | |
onFocus | Optional | ActionScript that runs when the calendar gets focus. | |
selectedDate | Optional | None (Flash shows the current month) | The date that is initially selected. It is highlighted in a color determined by the form skin. Must be in mm/dd/yyyy or dd/mm/yyyy format, depending on the current locale. (Use the setlocale function to set the locale, if necessary.) |
startRange | Optional | The start of a range of dates that are disabled. Users cannot select dates from this date through the date specified by the endRange attribute. | |
style | Optional | Flash ActionScript style or styles to apply to the calendar. For more information, see Setting styles and skins in Flash forms in the Developing ColdFusion Applications. | |
tooltip | Optional | Flash only: Text to display when the mouse pointer hovers over the control. | |
visible | Optional | yes | Flash only: Boolean value that specifies whether to show the control. Space that would be occupied by an invisible control is blank. |
width | Optional | Determined by Flash | The horizontal dimension of the calendar specified in pixels. |
The cfcalendar tag is not supported in XML format forms. |
<!--- Set initial selected and blocked-out dates.--->
<cfparam name="Form.startdate" default="#dateformat(now()-5, 'mm/dd/yyyy')#">
<cfparam name="Form.enddate" default="#dateformat(now()-1, 'mm/dd/yyyy')#">
<cfparam name="Form.selectdate" default="#dateformat(now(), 'mm/dd/yyyy')#">
<!--- If the form has been submitted, display the selected date. --->
<cfif isDefined("Form.submitit")>
<cfoutput><b>You selected #Form.selectedDate#</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" >
<cfcalendar name="selectedDate"
selectedDate="#Form.selectdate#"
startRange="#Form.startdate#"
endRange="#Form.enddate#"
mask="mmm dd, yyyy"
dayNames="SU,MO,TU,WE,TH,FR,SA"
firstDayOfWeek="1"
monthNames="JAN, FEB, MAR, APR, MAY, JUN, JUL, AUG, SEP, OCT, NOV, DEC"
style="rollOverColor:##FF0000"
width="200" height="150">
<cfinput type="dateField" name="startdate" label="Block out starts"
width="100" value="#Form.startdate#">
<cfinput type="dateField" name="enddate" label="Block out ends" width="100"
value="#Form.enddate#">
<cfinput type="dateField" name="selectdate" label="Initial date" width="100"
value="#Form.selectdate#" >
<cfinput type="Submit" name="submitit" value="Save" width="100">
</cfform>