Using the DateValidator to validate a single source input
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
<mx:DateValidator source="{birthday}"
property="text"
inputFormat="mm/dd/yyyy"
allowedFormatChars="/"
trigger="{submitButton}"
triggerEvent="click" />
<mx:Text text="Enter your birth date:" />
<mx:TextInput id="birthday" />
<mx:Button label="Submit" id="submitButton" />
</mx:Application>
Related examples in the same category