DateField parameters
You can set the following authoring parameters for each DateField component instance in the
Property inspector or in the Component inspector:
dayNames
sets the names of the days of the week. The value is an array and the default value
is
["S", "M", "T", "W", "T", "F", "S"]
disabledDays
indicates the disabled days of the week. This parameter is an array that can
have up to seven values. The default value is
firstDayOfWeek
indicates which day of the week (0-6, with 0 being the first element of
array) is displayed in the first column of the date chooser. This property changes
dayNames
the display order of the day columns.
The default value is 0, which is "S" for sunday.
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
"April", "May", "June", "July", "August", "September",
"October","November", "December"]
showToday
indicates whether to highlight today's date. The default value is
You can write ActionScript to control these and additional options for the DateField
component using its properties, methods, and events. For more information, see
class (Flash Professional only)" on page
Creating an application with the DateField
component
The following procedure explains how to add a DateField component to an application while
authoring. In this example, the DateField component allows a user to pick a date for an airline
reservation system. All dates before today's date must be disabled. Also, a 15-day range in
December must be disabled to create a holiday black-out period. Also, some flights are not
available on Mondays, so all Mondays must be disabled for those flights.
To create an application with the DateField component:
1.
Double-click the DateField 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(2001, 9, 1),
rangeEnd:new Date(2003, 11, 1)};
434
DateField component (Flash Professional only)
.
(an empty array).
[]
["January", "February", "March",
.
439.
.
true
"DateField
Need help?
Do you have a question about the FLASH 8-COMPONENTS LANGUAGE and is the answer not in the manual?
Questions and answers