I have this code for date entry in a Thymeleaf template:
The date format should be DD/MM/YYYY but currently if something like D/M/YYYY is entered no validation catches this and it causes an error in a downstream application. I'd like to add some functionality where a leading zero is added if the length of D or M are 1.
An example of what I'm trying to do but done with
JSP and JavaScript are as follows:
Think maybe I could do something along the lines of but not quite this: