User Guide

412 DateChooser component (Flash Professional only)
monthNames sets the month names that are displayed in the heading row of the calendar.
The value is an array and the default value is
["January", "February", "March",
"April", "May", "June", "July", "August", "September",
"October","November", "December"]
.
showToday indicates whether to highlight todays date. The default value is true.
You can set the following additional parameters for each DateChooser component instance in
the Component inspector (Window > Component Inspector):
enabled is a Boolean value that indicates whether the component can receive focus and input.
The default value is
true.
visible is a Boolean value that indicates whether the object is visible (true) or not (false).
The default value is
true.
You can write ActionScript to control these and additional options for the DateChooser
component using its properties, methods, and events. For more information, see
“DateChooser class (Flash Professional only)” on page 417.
Creating an application with the DateChooser
component
The following procedure explains how to add a DateChooser component to an application
while authoring. In this example, the date chooser allows a user to pick a date for an airline
reservation system. All dates before October 15th must be disabled. Also, a range in
December must be disabled to create a holiday black-out period, and Mondays must
be disabled.
To create an application with the DateChooser component:
1. Double-click the DateChooser component in the Components panel to add it to the Stage.
2. In the Property inspector, enter the instance name flightCalendar.
3. In the Actions panel, enter the following code on Frame 1 of the timeline to set the range
of selectable dates:
flightCalendar.selectableRange = {rangeStart:new Date(2003, 9, 15),
rangeEnd:new Date(2003, 11, 31)}
NOTE
The minHeight and minWidth properties are used by internal sizing routines. They are
defined in UIObject, and are overridden by different components as needed. These
properties can be used if you make a custom layout manager for your application.
Otherwise, setting these properties in the Component inspector will have no visible
effect.