I am not sure if it is only me. I have try this serveral times with date field component.
Here is my code:
<mx:Script>
<![CDATA[
private function init():void
{
text1.text = dateField.selectedDate.fullYear
+ "/" + dateField.selectedDate.month + "/" + dateField.selectedDate.date;
}
]]>
</mx:Script>
<mx:Text id="text1" />
<mx:DateField id="dateField" close="init();" formatString="YYYY/MM/DD"/>
after the date field closed, the text show the right YEAR and DATE, but not the right MONTH. If I choose January, the MONTH will actually becomes to ZERO.
Please, could anyone tell me why!
Thank you so much.
Have a good festive season.