Hi,

I'm writing a custom DateValidator (subclassing it in AS) which adds 2
properties to the existing one: minDate:Date and maxDate:Date

What I'd like to do is compare the dates to see if the inputted date
is within the correct range. However, I can't tell which inputFormat
f.e. a DateField will have, since it is configurable through it's
formatString-property.
I have some problems with parsing this value (of the DateField) back
to a date, since Date.parse() doesn't support the format "DD/MM/YYYY"

I'd like to know if there is a parse-method in which we can provide
the format of the string as a parameter, sth like
    Date.parse(value:String, format:String = null)
would be wonderful

This validator is to be used in form where a user can input a start-
and enddate, and to check if startdate=<enddate. If there is any other
method to do this, please share..

Thanks,
--Johan

Reply via email to