User Guide

DateField.selectedDate 459
Example
The following example defines the selectable range as the dates between and including May 7
and June 7:
my_df.selectableRange = {rangeStart: new Date(2001, 4, 7), rangeEnd: new
Date(2003, 5, 7)};
The following example defines the selectable range as the dates after and including May 7:
my_df.selectableRange = {rangeStart: new Date(2003, 4, 7)};
The following example defines the selectable range as the dates before and including June 7:
my_df.selectableRange = {rangeEnd: new Date(2003, 5, 7)};
The following example defines the selectable date as June 7 only:
my_df.selectableRange = new Date(2003, 5, 7);
DateField.selectedDate
Availability
Flash Player 6 (6.0.79.0).
Edition
Flash MX Professional 2004.
Usage
dateFieldInstance.selectedDate
Description
Property; a Date object that indicates the selected date if that value falls within the value of
the
selectableRange property. The default value is undefined.
Example
The following example sets the selected date to June 7:
my_df.selectedDate = new Date(2003, 5, 7);
The following example uses a DateField instance named my_df on the Stage to show how to
disable an already selected date (otherwise, the user can click it again to clear the date
field entry):
function dfListener(evt_obj:Object):Void {
my_df.disabledRanges = [my_df.selectedDate];
}
my_df.addEventListener("change", dfListener);