Bind DateValidator to more than one controls : DateValidator « Data Model « Flex






Bind DateValidator to more than one controls

Bind DateValidator to more than one controls
   


<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
    layout="horizontal">
    <mx:DateValidator monthSource="{month}" 
                      monthProperty="value"
                      daySource="{day}" 
                      dayProperty="value" 
                      yearSource="{year}"
                      yearProperty="text" 
                      trigger="{submitButton}" 
                      triggerEvent="click" />
    <mx:Text text="Month:" />
    <mx:NumericStepper id="month" />
    <mx:Text text="Day:" />
    <mx:NumericStepper id="day" />
    <mx:Text text="Year:" />
    <mx:TextInput id="year" />
    <mx:Button label="Submit" id="submitButton" />
</mx:Application>

   
    
    
  








Related examples in the same category

1.Use Submit button to trigger validationUse Submit button to trigger validation
2.Set trigger event for DateValidatorSet trigger event for DateValidator
3.Set source and input format for DateValidatorSet source and input format for DateValidator
4.Set up input format for DateValidatorSet up input format for DateValidator
5.DateValidator and form input boxesDateValidator and form input boxes
6.Use DateValidator to validate and use DateForamtter to formatUse DateValidator to validate and use DateForamtter to format
7.Validate a Date objectValidate a Date object