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,
&l开发者_StackOverflow中文版t;mx:FormItem label="Start Date" required="true">
<mx:DateField id="startDateField" formatString="MM-YYYY"/>
</mx:FormItem>
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.
精彩评论