Provides a selection from a range of dates.

Available since





The currently selected date. Returns null if no date is selected.

When the value of the selectedDate property changes, the component will dispatch an event of type Event.CHANGE.

The following example selects a specific date:

control.selectedDate =;

The following example clears the currently selected date:

control.selectedDate = null;

The following example listens for when the selection of a calendar component changes, and it requests the new selected index:

var datePicker = new DatePicker();
function changeHandler(event:Event):Void
	var datePicker = cast(event.currentTarget, DatePicker);
	trace("selection change: " + datePicker.selectedDate);
datePicker.addEventListener(Event.CHANGE, changeHandler);
Available since



See also: