ok, I can life with it if that's the intended behavior. But here's
another problem: in my special case, a date *has* to be chosen (the user
may not deselect a date).

I thought I could use the DateField.change() event for validation. If
the selectedDate is undefined I simply set a default date:

<!-- mxml snippet -->
<mx:DateField change="checkDate(event)" />

// AS snippet
function checkDate(evt:Object):Void {
if (evt.target.selectedDate == undefined) {
// the user selected no date or 
// clicked the selected date again
evt.target.selectedDate = new Date(2004, 4, 14);
}
}

This does work to a certain degree: the selectedDate gets set
programmatically and the calendar does show the new selection when
re-opening it, *but* the field still remains empty.

Dirk.


Reply via email to