How to Validate a Date Range in Flex
I had the need to validate a date based on a range of allowed dates, and I couldn’t find this validation control anywhere for Flex. The reason is probably because it’s just so easy to write.
The solution is to write a custom validator that extends DateValidator, pass in the start and end dates, and then perform the validation. This way I can benefit from the nice inline validation Flex gives us.
The actual validation code to compare dates is based on the Date.parse() which you can see in the class code.
The class: DateRangeValidator.as
» continue readingCategories: General • Flex • Permalink


