Reputation: 6660
Why can the HTML5 element <input type="date">
let the user scroll through the dates to an invalid date such as 31 September 2014
?
DEMO: http://jsfiddle.net/oztjryx4/1/
Why does Chrome allow this to happen? How can I check if the date is invalid or does not exist?
Upvotes: 3
Views: 2321
Reputation: 6160
You can detect such invalid dates with input.validity.badInput. According to http://crbug.com/231811, the reason is simplicity.
Upvotes: 6