Flex DateChooser with Date Class


 

Flex DateChooser with Date Class

In this tutorial you can see how to create DateChooser with the help of Date Class and you can see what process is doing for this purpose.

In this tutorial you can see how to create DateChooser with the help of Date Class and you can see what process is doing for this purpose.

DateChooser with Date Class:-

In this tutorial you can see how to use DateChooser with the help of Date Class in flex and how to use it. DateChooser control use selectedDate property  to store currently selected date as object of type Date. You can create Date objects to represent date and time values, or access the Date in the selectedDate property. The Date class has many methods you can use to assess or manipulate a date. In the flex, you want to use Date object then you can use <mx:Date> tag. Example is given below,

Example:-

<?xml version="1.0"?>

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

<mx:Panel width="400" height="400">

<mx:Form>

<mx:FormItem label="Date :">

<mx:DateChooser id="date1">

<mx:selectedDate>

<mx:Date month="3" date="10" fullYear="2011"/>

</mx:selectedDate>

</mx:DateChooser>

</mx:FormItem>

</mx:Form>

</mx:Panel>

</mx:Application>

In this tutorial you can see how to create a DateChooser with the help of Date class. You can see how to set month, date and year for show the user with selected date or provide Date object.

Output:-

You can see the date are selected that you can set with the Date control.

 

 

 

 

Ads