In my update screen this is the part I define the datefield.
< mx:DateField id="endingDateDatefield" text="{formatDate(myModel.endingDate)}" formatString="{FORMAT_STRING}" width="50%" height="25"/>Notice that formatDate() returns String.
The datefield is displayed correctly but when I try to save the new model I saw no value in debug. "parentPanel.endingDateDatefield.selectedDate" is null.
So I changed my code to:
< mx:DateField id="endingDateDatefield" selectedDate="{myModel.endingDate}" formatString="{FORMAT_STRING}" width="50%" height="25"/>
Now I set the selectedDate field instead of text in DateField component which fixes the issue.
No comments:
Post a Comment