ActionScript 2.0 Components Language Reference |
|
|
|
| DateChooser component > DateChooser.selectableRange | |||
Flash Player 6 (6.0.79.0).
Flash MX Professional 2004.
dateChooserInstance.selectableRange
Property; sets a single selectable date or a range of selectable dates. The user cannot scroll beyond the selectable range. The value of this property is an object that consists of two Date objects named rangeStart and rangeEnd. The rangeStart and rangeEnd properties designate the boundaries of the selectable date range. If only rangeStart is defined, all the dates after rangeStart are enabled. If only rangeEnd is defined, all the dates before rangeEnd are enabled. The default value is undefined.
If you want to enable only a single day, you can use a single Date object as the value of selectableRange.
Specify a full date when you define dates--for example, new Date(2003,6,24) rather than new Date(). If you don't specify a full date, the Date object returns the current date and time. If you don't specify a time, the time is returned as 00:00:00.
The value of DateChooser.selectedDate is set to undefined if it falls outside the selectable range.
The values of DateChooser.displayedMonth and DateChooser.displayedYear are set to the nearest last month in the selectable range if the current month falls outside the selectable range. For example, if the current displayed month is August, and the selectable range is from June 2003 to July, 2003, the displayed month changes to July 2003.
The following example defines the selectable range as the dates between and including May 7 and June 7:
my_dc.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_dc.selectableRange = {rangeStart: new Date(2005, 4, 7)};
The following example defines the selectable range as the dates before and including June 7:
my_dc.selectableRange = {rangeEnd: new Date(2005, 5, 7)};
The following example defines the selectable date as June 7 only:
my_dc.selectableRange = new Date(2005, 5, 7);
|
|
|
|