1

I have a date field in flex and have the format set to YYYY-MM-DD. As long as the user clicks the calendar pop-up it set's it that way.

However, I need to allow the field to be human enter-able so they can type in a date.

The problem is, most users want to type the format MM/DD/YYYY. I have a tool tip that shows the format, but how can I check the format and change it to the YYYY-MM-DD format, or do something else appropriate (alert?)?

1 Answer 1

1

Easy enough:

DateFormatter.parseDate(yourString);

As long as your string is somewhat of a standard format, it should work.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.