My 5th book "50 Tips on JavaScript" is on sale. Go get it from https://50tips.dev.
Illustrated guide to 50 of the most interesting JavaScript topics.

Validating date in JavaScript

A very simple way to validate date in JavaScript.
function (mm, dd, yyyy) {
    var d = new Date(mm + "/" + dd + "/" + yyyy);
    return d.getMonth() + 1 == mm && d.getDate() == dd && d.getFullYear() == yyyy;
  }
If you enjoy this post, share it on Twitter, Facebook or LinkedIn. To leave a comment go here.