no problem.
To achieve what you need you also have another solution with the validator.
(you can also check always the validation, even if is prevent when the user
makes some action there is some times that the dates are setted programmaticly
so the validation will prevent that some crazy data will go forward)
I will just pass the idea.
you extend the datevalidator class
override the method doValidation
override protected function doValidation(value:Object):Array {
results = []; results =
super.doValidation(value);
var StartTimestamp : Number =
StartDate.getTime (); // create milisec from start date var
EndTimestamp : Number = StartEnd.getTime (); // create milisec from end date
/**** CHECK THE DATEs and return the results*/}
I hope will be enough for you to go to the next step.
Miguel
> Date: Thu, 26 Sep 2013 14:37:44 +0200
> Subject: Re: Validate two fields in a validator
> From: [email protected]
> To: [email protected]
>
> Thanks! That will help.
> I will look at it
>
>
> 2013/9/26 Miguel Ferreira <[email protected]>
>
> > sorry about the short reply.
> > but we can see here:
> > http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/mx/controls/DateChooser.html#selectableRange
> > That will help your user to no select some dates
> > on the rangeStart : just put the selected date from the your component
> > then you can add one day or something that adjust your BL.
> > I hope that helps.Miguel
> >
> > > From: [email protected]
> > > To: [email protected]
> > > Subject: RE: Validate two fields in a validator
> > > Date: Thu, 26 Sep 2013 13:16:54 +0100
> > >
> > > you can also give a selectedRange then that error is prevented.
> > >
> > > > Date: Thu, 26 Sep 2013 14:14:21 +0200
> > > > Subject: Validate two fields in a validator
> > > > From: [email protected]
> > > > To: [email protected]
> > > >
> > > > Hi.
> > > >
> > > > I have a date validator on each field which validates if they are a
> > correct
> > > > date.
> > > > However, in one of the two date fields, I need to validate if it is
> > after
> > > > the other date.
> > > >
> > > > So this means I have to somehow get the other inputfield date in my
> > > > validator.
> > > > I have tried to do this using a listener on the other field, but it
> > > > retrieves null.
> > > >
> > > > Any ideas how I can do this?
> > > >
> > > > Shervin
> > >
> >
> >