# Date field issue

**URL:** <https://forum.kirupa.com/t/date-field-issue/278165>\
**Category:** Uncategorized\
**Created:** [December 23, 2008, 9:47am UTC](https://forum.kirupa.com/t/date-field-issue/278165 "2008-12-23T09:47:42Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![mywork888](https://avatars.discourse-cdn.com/v4/letter/m/f0a364/32.png) [@mywork888](https://forum.kirupa.com/u/mywork888)\
**Post date:** [December 23, 2008, 9:47am UTC](https://forum.kirupa.com/t/date-field-issue/278165/1 "2008-12-23T09:47:42Z")

</div>

I am not sure if it is only me. I have try this serveral times with date field component.

Here is my code:

```
&lt;mx:Script&gt;
	&lt;![CDATA[
		private function init():void
		{
			text1.text = dateField.selectedDate.fullYear
			 + "/" + dateField.selectedDate.month + "/" + dateField.selectedDate.date;
		}
	]]&gt;
&lt;/mx:Script&gt;

&lt;mx:Text id="text1" /&gt;

&lt;mx:DateField id="dateField" close="init();" formatString="YYYY/MM/DD"/&gt;

```

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.
