Answers for "check if a date time string is a valid date in js"

0

check if a date time string is a valid date in js

const isValidDate = function(date) {
    return (new Date(date) !== "Invalid Date") && !isNaN(new Date(date));
}
Posted by: Guest on October-08-2021

Code answers related to "check if a date time string is a valid date in js"

Code answers related to "Javascript"

Browse Popular Code Answers by Language