In my opinion, using a calendar control allowing user to select a date as opposed to entering a date manually is the best option. This will reduce the number of validations we need to add. Also, it will reduce typo errors (adding negative numbers, missing a /, etc.). With calendar control, we can also choose a display format.
To provide user friendly interface a date control will help user to pick correct date from the calendar.
If the user enters date manually in the text field we need to check the format using validation. Here we need to check the date pattern. So you can create or use existing edit validate rules that use regular expression pattern matching to validate user inputs. validate rule will have some predefined functions but we can not check a pattern there.
Posted: 1 year ago
Updated: 1 year ago
Posted: 27 Feb 2020 11:29 EST Updated: 2 Mar 2020 15:23 EST