hi ShriPriya
thank you very much
yes that works
:) cool



On Tue, Jul 27, 2010 at 7:20 PM, Shri Priya S <[email protected]>wrote:

> Hi Malek,
> I have changed your code as below. Hope this helps
>
> <?xml version="1.0" encoding="utf-8"?>
>
>
> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml";
> layout="absolute">
>
>
> <mx:Script>
>
>
> <![CDATA[
>
>
> *import* mx.controls.Label;
>
>
> *import* mx.controls.TextInput;
>
>
> *import* mx.managers.PopUpManager;
>
>
> *import* mx.controls.DateField;
>
>
> *import* mx.controls.DateChooser;
>
>
> *import* mx.controls.Alert;
>
>
> *public* *function* formatDate(item:Object):String {
>
>
> *return* dateF.format(item.data);
>
>
>
> }
>
>
> *public* *function* displayDate(obj:Object):*void* {
>
>
> var dateC:DateField = new DateField();
> dateC.width = 100;
> mycombo.addChild(dateC);
> var myDate:String = "11/05/2009"; // replace this string with ur date
> selected
> var d:Date = new Date(myDate);
> dateC.open();
> dateC.selectedDate = new Date(d.fullYear,d.month, d.date);
>
> *//Application.application.addChild(dateC);
> *
>
>
>  }
>
>
> ]]>
>
>
> </mx:Script>
>
>
> <mx:DateFormatter id="dateF" formatString="DD/MM/YYYY"/>
>
>
> <mx:ComboBox id="mycombo" x="10" y="34" dataProvider="{
> UserRoleModel.getInstance().userRoleArray}"
> labelFunction="formatDate"
> change="displayDate(mycombo.selectedLabel)">
>
>
> </mx:ComboBox>
>
>
>  </mx:Application>
>
> Let me know if this helps
>
> --
>  You received this message because you are subscribed to the Google Groups
> "Flex India Community" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected]<flex_india%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/flex_india?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups "Flex 
India Community" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/flex_india?hl=en.

Reply via email to