archenil
archenil

Reputation: 3

Flex DateField SelectedField Always Set to NULL

I'd like to format the DateField string as "MM/YYYY". However, I notice that its selectedDate property is always set to null even if a valid date is selected. Can someone shed some light on this?

Thanks,

<mx:FormItem label="Start Date" required="true">
    <mx:DateField id="startDateField" formatString="MM-YYYY"/>
</mx:FormItem>

Upvotes: 0

Views: 1601

Answers (1)

Angelo
Angelo

Reputation: 1666

Set the parseFunction property on your dateField.

<mx:DateField id="startDateField" formatString="MM-YYYY" parseFunction="{null}" />

I think the formatString is messing up with the selectedDate value on the dateField.

Check here for much deeper explanation.

Upvotes: 1

Related Questions