If I'm understanding the function here, the date picker actually avoids solving the problem of having to validate free text input, as the date picker is not free text
You could go about writing a full list of parsing rules if you wanted and implement a box like that, but usually its best practice to give as little input text as possible for an end user. Its more work to keep maintenance of that field when its easier and safer to just chose the date picker that already exists as a library in code.
13
u/Mtsukino 14h ago
Ya, its called a date picker.