Как проверить, является ли строка типом даты и времени в java script.
Please don't mark this as the duplicate. I found many answers to check if string is of type date without adding any jquery libraries.But Couldn't find anything.
function IsDate() { var date = "26.02.2016 11:48:36" return Date.Parse(new Date("26.02.2016 11:48:36")); }
The above code says the date is invalid but it is a valid date. Can any one please let me know how to check this kind of string value as date type in Jquery/Javascript?
Что я уже пробовал:
Many Solutions suggested to use Date.Parse() method or use datejs external library. For the string "26.02.2016 11:48:36" but the Date.Parse() method returns "Nan" where as it had to say as valid date.