Solution Review: Validate the Date
Explore how to validate date strings in JavaScript by creating date objects and verifying their validity with built-in methods. This lesson helps you understand checking both the date type and the time to ensure correct date input.
We'll cover the following...
We'll cover the following...
Solution #
Explanation
In this challenge, you need to check whether the dateString that we pass is valid or not. The requirement was to check for two things:
-
Whether
dateis a valid date object -
Whether the time ...