Sololearn: Learn to Code
New course! Every coder should learn Generative AI!
Try a free lesson
0
Rather than going to the trouble of validating a date, i often find its best (and simpler) to control the input. Take a look at input type = "date" in the html5 specification. Although the results will differ across browsers, it may give just what you want.
26th Apr 2017, 6:41 AM
Steve Adams