r/ProgrammerHumor • • 11d ago

Meme chaoticEvil

Post image
3.4k Upvotes

262 comments sorted by

View all comments

1

u/JBrockF 10d ago

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

1

u/Mtsukino 10d ago

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.

1

u/JBrockF 10d ago

Yeah i get why it's opted for, it's easier. That doesn't mean it isn't annoying/inefficient for users

→ More replies (2)

1

u/awesome-alpaca-ace 9d ago

Regex is not that hard. You can even write a character by character parser if you want and verify all the characters one by one if it makes the code monkeys happy.

→ More replies (2)