This content has been marked as final. Show 5 replies
It depends on when you are setting the date. Doing it in the initialize event won't work; doing it from creationComplete will.
Application MXML file:
<?xml version="1.0" encoding="utf-8"?>
// ActionScript file
public function fnTest():void
idTest.selectedDate = new Date();
Try to select currently selected date, DateField object must deselect it.
I'm getting frustrated actually. "Selecting the currently selected date in the control deselects it, sets the selectedDate property to null," Are they saying if a user clicks the control but doesn't change date the selectedDate returns null?
My DateFields have bn working fine until i introduced the dateformatter. If I change dates or click them, selectedDate returns null, the debugger confirms it.
So what method do i use to get the user selected date???
If you use a date formatter, you must specify a parseFunction to "undo" the formatting back into a date. Otherwise, the component has no idea what to do with the custom-formatted text. Yes, they could've implemented this better.