开发者

Flex DateField SelectedField Always Set to NULL

开发者 https://www.devze.com 2023-02-17 01:32 出处:网络
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?

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消