hie misael
u can try this way.
i think its a return function mistake
it has to be String not void.

example
<mx:DateFormatter id="dfconv" formatString="YYYY/MM/DD"/>
<mx:Script>
<![CDATA[
private function formatDate(date:Date):String
{
return dfconv.format(date);
}
]]>
</mx:Script>

instruction:
You can choose a different name for the function,
but it must take a single argument of type Date and
return the date as a String for display in the text field.

bye,,

Misael <[EMAIL PROTECTED]> wrote:
Hi,
I have a dateField on which i want to format the displayed date. I want to show it like "DD/MM/YYYY". I´m trying to use this function with a call in the change="formatNasc(DateField(event.target).selectedDate)" event, but it still displays in "MM/DD/YYYY" format.

private function formatNasc(date:Date):void{
    var formatter:DateFormatter = new DateFormatter();
    formatter.formatString = "DD/MM/YYYY";   
    xClienteDataNasc.text = formatter.format(date);
}

What´s the point here?
Regards.


	
		
Yahoo! India Answers Share what your know-how and wisdom
Send free SMS to your Friends on Mobile from your Yahoo! Messenger Download now

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com




SPONSORED LINKS
Web site design development Computer software development Software design and development
Macromedia flex Software development best practice


YAHOO! GROUPS LINKS




Reply via email to