DateField.disabledRanges

Availability

Flash Player 6 (6.0.79.0).

Edition

Flash MX Professional 2004.

Usage

dateFieldInstance.disabledRanges

Description

Property; disables a single day or a range of days. This property is an array of objects. Each object in the array must be either a Date object specifying a single day to disable, or an object containing either or both of the properties rangeStart and rangeEnd, each of whose value must be a Date object. The rangeStart and rangeEnd properties describe the boundaries of the date range. If either property is omitted, the range is unbounded in that direction.

The default value of disabledRanges is undefined.

Specify a full date when you define dates for the disabledRanges property--for example, new Date(2003,6,24) rather than new Date(). If you don't specify a full date, the time returns as 00:00:00.

Example

The following example defines an array with rangeStart and rangeEnd Date objects that disable the dates between May 7 and June 7:

my_df.disabledRanges = [ {rangeStart: new Date(2003, 4, 7), rangeEnd: new Date(2003, 5, 7)}];

The following example disables all dates after November 7:

my_df.disabledRanges = [ {rangeStart: new Date(2003, 10, 7)} ];

The following example disables all dates before October 7:

my_df.disabledRanges = [ {rangeEnd: new Date(2002, 9, 7)} ];

The following example disables only December 7:

my_df.disabledRanges = [ new Date(2003, 11, 7) ];

The following example disables December 7 and December 20:

my_df.disabledRanges = [ new Date(2003, 11, 7), new Date(2003, 11, 20)];