I don't know if it's a bug. I think it only happens if
you are not using English standart dates (MM/DD/YYYY).
To use different type of dates you need set a parsing
function here is an example:

//date parse function
private function pDate(data:String,inp:String):Date
{                               
return
mx.controls.DateField.stringToDate(data,"DD.MM.YYYY");
}
//date formatter
<mx:DateFormatter id="df" formatString="DD.MM.YYYY" />

//inline usage
<mx:DateField height="20" formattingFunction="fDate"
parsingFunction="pDate" />

it should solve you problem

Ulich Dmitriy
Termin

--- Alberto Albericio Salvador
<[EMAIL PROTECTED]> wrote:

> I found the same bug some weeks ago. I cant use the
> formattingFunction 
> and I hope it gets fixed soon
> 
> Alberto Albericio Salvador
> Aura S.A. Seguros
> Departamento Informática
> 
> 
> 
> Benoit Hediard escribió:
> > I've encountered this annoying bug today.
> > When using the formatFunction attribute of
> DateField, when the component
> > looses its focus, it erases the date text field.
> >  
> > To reproduce the problem, simply execute the
> following code from LiveDocs,
> > select a date and move the focus to the other text
> input:
> > <mx:DateFormatter id="dfconv"
> formatString="YYYY/MM/DD"/>
> > <mx:Script>
> > <![CDATA[
> > private function formatDate(date:Date):String
> > {
> >     return dfconv.format(date);
> > } 
> > ]]>
> > </mx:Script>
> >
> > <mx:DateField id="df"
> formattingFunction="formatDate" />
> >
> > <mx:TextInput />
> >
> > There is a simple workaround, but it does not work
> all the time:
> > <mx:DateFormatter id="dfconv"
> formatString="YYYY/MM/DD"/>
> > <mx:Script>
> > <![CDATA[
> > private function formatDate(date:Date):String
> > {
> >     return dfconv.format(date);
> > }
> >
> > private function onChange():void {
> >     df.text = formatDate(df.selectedDate);
> > }
> > ]]>
> > </mx:Script>
> >
> > <mx:DateField id="df" change="onChange()" />
> >
> > <mx:TextInput />
> >
> > Benoit Hediard
> >
> >
> >
> >  
> >  
> >
> >
> >
> >
> > --
> > Flexcoders Mailing List
> > FAQ:
>
http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> > Search Archives:
>
http://www.mail-archive.com/flexcoders%40yahoogroups.com
> 
> > Yahoo! Groups Links
> >
> >
> >
> >  
> >
> >
> >
> >
> >   
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


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

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to