Set selectedDate property in a function

<?xml version="1.0"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
<mx:Script>
private function initDC():void {
date2.selectedDate = new Date (2003, 3, 10);
}
</mx:Script>
<mx:DateChooser id="date2" creationComplete="initDC();" />
</mx:Application>
Related examples in the same category