Here's the scenario:

<mx:DateFormatter id="dateF" formatString="MMM DD YYYY" />

<mx:DateField id="leaseDate_date" width="100" height="22" x="146"
y="124" labelFunction="formatDate" focusOut="setExpireDate()"
tabIndex="207"/>

public function formatDate(date:Date):String

{




return (dateF.format(date));




}

The problem is that if I use a date formatter such as this, I cannot
reference the selectedDate property because it doesn't get set. I know
it doesn't get set because if I click the  date icon for that field, the
date shown in the text portion of the component isn't highlighted in the
calendar pop-up. But, if I leave out the formatting, and then select a
date from the calendar pop-up, and the text shows 01/01/2007, and I
re-open the calendar pop-up then the selectedDate is appropriately set.

So, obviously, the question is, "Does anyone know why this happens and
how to fix it so I can use a formatting function to set the DateField
text to 'MMM DD YYYY' and have the selectedDate property appropriately
set as well?"

Thanks,

R. Grimes

Reply via email to