cfcalendar

Puts an interactive Macromedia Flash format calendar in an HTML
or Flash form. Not supported in XML format forms. The calendar
lets a user select a date for submission as a form variable.

  <cfcalendar name="">

 cfcalendar(name="");

The cfcalendar tag is DEPRECATED as of ColdFusion 2016

Attribute Reference

name string
Required

The name of the calendar.

height numeric

The vertical dimension of the calendar specified in pixels.

width numeric

The horizontal dimension of the calendar specified in pixels.

selecteddate string

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 tag to set the locale, if necessary.)

startrange string

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.

endrange string

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.

disabled boolean

Disables all user input, making the control read only.
To disable input, specify disabled without an attribute
or disabled="true". To enable input, omit the attribute
or specify disabled="false".
Default is: false
Values:
  • true
  • false

mask string
Default: MM/DD/YYYY

A pattern that specifies the format of the submitted date.
Mask characters are:
- D = day, can use 0-2 mask characters
- M = month, can use 0-4 mask characters
- Y = year, can use 0, 2, or 4 characters
- E = day in week, can use 0-4 characters
- Any other character = put the character in the specified location
Default is: MM/DD/YYYY
Values:
  • MM/DD/YYYY
  • DD/MM/YYYY
  • MM/YYYY
  • MM/YY
  • YYYY-MM-DD
  • EEE DD. MMM YYYY

firstdayofweek numeric
Default: 0

Integer in the range 0-6 specifying the first day of the
week in the calendar, 0 indicates Sunday, 6 indicates Saturday.
Default is: 0
Values:
  • 0
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6

daynames string
Default: 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.
Default is: S,M,T,W,Th,F,S
Values:
  • S, M, T, W, Th, F, S
  • Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday
  • Sun, Mon, Tue, Wed, Thu, Fri, Sat

monthnames string
Default: 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.
Values:
  • January, February, March, April, May, June, July, August, September, October, November, December
  • Jan, Feb, Mar, Apr, May, Jun, Jul, Aug, Sep, Oct, Nov, Dec

enabled boolean
Default: true

Flash only: Specifying whether the control is enabled. A
disabled control appears in light gray. This is the inverse
of the disabled attribute.
Values:
  • true
  • false

visible boolean
Default: true

Flash only: Specifying whether to show the control. Space
that would be occupied by an invisible control is blank.
Values:
  • true
  • false

tooltip string

Flash only: Text to display when the mouse pointer hovers
over the control.

style string

Flash only: Actionscript style or styles to apply to the calendar.
Default is: haloGreen
Values:
  • haloBlue
  • haloGreen
  • haloOrange
  • haloSilver

onchange string

Flash only: ActionScript that runs when the user selects a
date.

onblur string

Flash only: ActionScript that runs when the user selects a
date.

onfocus string

Flash only: ActionScript that runs when the user selects a
date.

Compatibility

ColdFusion:

DEPRECATED since version 2016

Examples
Sample code using the cfcalendar tag

Signup for cfbreak to stay updated on the latest news from the ColdFusion / CFML community. One email, every friday.

Fork me on GitHub