This content has been marked as final.
Show 6 replies
-
1. Re: Formatting Dates
GordonSmithMay 11, 2006 11:48 PM (in response to Caps1984)
Nice find! I've filed it as a bug. -
2. Re: Formatting Dates
GordonSmithMay 12, 2006 12:34 AM (in response to GordonSmith)
Oops... not a bug after all. If you specify a labelFunction, you're supposed to also specify a parseFunction for DateField. The ASDoc for labelFunction says "If you allow the user to enter a date in the text field of the DateField control, and you define a formatting function using the labelFunction property, you should specify a function to the parseFunction property that converts the input text string to a Date object for use by the DateField control, or set the parseFunction property to null." In Beta 2 you could use the DateField method stringToDate() as your parseFunction, but we mistakenly made that function private in Beta 3. However, the simpler solution is set neither labelFunction nor parseFunction but instead simply set formatString="DD/MM/YYYY" on the <mx:DateField>. That format will be used both for formatting and for parsing. -
3. Formatting Dates
Caps1984 May 14, 2006 3:21 PM (in response to GordonSmith)Great! Thanks very much for your help - a good start to a Monday morning!
Edit: On a 2nd look, formatString is not a valid attribute for DateField, at least in Beta 3. But the problem is resolved if you set parseFunction to "null" as specified above.
Thanks again for your help! -
4. Re: Formatting Dates
GordonSmithMay 15, 2006 9:46 PM (in response to Caps1984)
I didn't realize that the 'formatString' property is a recent addition to DateField. Look for it in the GMC candidate. -
5. Re: Formatting Dates
Caps1984 May 15, 2006 9:54 PM (in response to GordonSmith)GMC Candidate? Is that the next public release? -
6. Re: Formatting Dates
poonamsheth Jun 2, 2006 11:38 AM (in response to Caps1984)Whats GMC Candidate? [Want to knoe for knowledge purpose]