Answers for "how to validate input type=date in javascript"

1

javascript validate date

var date_regex = /^(0[1-9]|1[0-2])\/(0[1-9]|1\d|2\d|3[01])\/(19|20)\d{2}$/;
if (!(date_regex.test(testDate))) {
    return false;
}
Posted by: Guest on May-12-2020
-1

how to validate input type=date in javascript

function isValidDate(d){
    return !isNaN((new Date(d)).getTime());
}
Posted by: Guest on June-07-2020

Code answers related to "how to validate input type=date in javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language