Apache flex Flex DateField SelectedField始终设置为空

Apache flex Flex DateField SelectedField始终设置为空,apache-flex,datefield,Apache Flex,Datefield,我想将日期字段字符串的格式设置为“MM/YYYY”。但是,我注意到它的selectedDate属性始终设置为null,即使选择了有效日期。有人能解释一下吗 谢谢 <mx:FormItem label="Start Date" required="true"> <mx:DateField id="startDateField" formatString="MM-YYYY"/> </mx:FormItem> 在日期字段上设置parseFunction属性

我想将日期字段字符串的格式设置为“MM/YYYY”。但是,我注意到它的selectedDate属性始终设置为null,即使选择了有效日期。有人能解释一下吗

谢谢

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

在日期字段上设置parseFunction属性

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

我认为formatString与dateField上的selectedDate值弄乱了

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

查看更深入的解释。

非常感谢您的回答Angelo。Flex有时真的很奇怪!