Home Tutorial Flex Flex-components Flex DateChooser with selected Date

 
 

Flex DateChooser with selected Date
Posted on: April 1, 2010 at 12:00 AM
In this tutorial we can discuss how to set Date that are selecteable in the DateChooser. And also discuss this process in this tutorial.

DateChooser With selectedDate Property:-

In this tutorial you can see how to use selectedDate property with DateChooser controls in flex. Firstly create <mx:DateChooser control and set id of this control. After that create a method that are set selectedDate object with full date with this DateChooser. And you can see the selected year in the text box in this tutorial.

Example:-

<?xml version="1.0" encoding="utf-8"?>

<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">

<mx:Script>

<![CDATA[

private function initDC():void {

date2.selectedDate=new Date (2010, 3, 10);

}

]]>

</mx:Script>

<mx:VBox>

<mx:DateChooser id="date2" creationComplete="initDC();"/>

<mx:TextInput text="{date2.selectedDate.fullYearUTC}"/>

</mx:VBox>

</mx:Application>

Output:-

 

you can see output of this example with selected date.

Related Tags for Flex DateChooser with selected Date:


Ask Questions?

If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.

Ask your questions, our development team will try to give answers to your questions.