Dear FlexCoders,
I have a title window where I have a datefield and button control declared as
follows:
<mx:DateField id="dateFieldTest" formatString="DD/MMM/YYYY"
change="dateFieldTest_Change(DateField(event.target).selectedDate)" />
<mx:Button id="btnTest" label="Test" click="btnTest_Click(event)" />
and the function(s):
private function dateFieldTest_Change(dateSel:Date) :void
{
Alert.show(String(dateSel));
}
private function btnTest_Click(evt:Event) :void
{
Alert.show(String(dateFieldTest.selectedDate));
}
The odd thing about it is that the function dateFieldTest_Change event, when
triggered displays two alert boxes, the date which was selected and null. I
think the first message that is displayed is the date value and then the null
(since the null alert box is on top of the date value alert box).
When the function btnTest_Click is triggered, the alert displays null as well,
eventhough on the dateFieldTest control, the date is displayed and has been
selected.
Am I missing something here?
Angelo