author: Krasimir Tsonev

Hi there, I'm . Senior front-end engineer with over 13 years of experience. I write, speak and occasionally code stuff. Follow me on Twitter, GitHub, Facebook or LinkedIn

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. Or maybe comment below: