What I mean is for ex. I have a DataField with editable="true" and format mm/dd/yyyy. Then lets say user typed in month
13 which is not correct. How can I validate it as well as
dd section and
yyyy section and show a pop up when it's incorrect?
Here is what happening when
apply button was clicked:
var newDate:Date = dfDate.selectedDate; var month:String = (newDate.month + 1) < 10 ? "0" + (newDate.month + 1).toString() : (newDate.month + 1).toString(); var date:String = newDate.date < 10 ? "0" + newDate.date.toString() : newDate.date.toString(); var year:Number = newDate.getFullYear(); var dateString:String = month + "/" + date + "/" + year;
<mx:FormItem id="itemDate"> <mx:DateField id="dfDate" yearNavigationEnabled="true" editable="true"/> </mx:FormItem>