Closed
Description
I want to use min
and max
attributes to restrict range with builtin HTML5 datepicker, but jquery-validation tries to validate the input and shows the error 'Please enter a value greater than or equal to NaN.'. I believe that this behavior is incorrect. From my point of view validator should not display message if date time is in valid range or should display actual restriction. HTML date input uses sortable date format yyyy-mm-dd
so quick fix may be not try to interpret min
and max
attributes as numbers.
<form method="post">
<div>
<input type="date" min="2012-07-01" max="2012-07-31" value="2012-07-07"/>
</div>
<div>
<input type="submit"/>
</div>
</form>
fiddle test: http://jsfiddle.net/LcL7a/1/ tested in Chrome 20 and Opera 12.
Metadata
Metadata
Assignees
Labels
No labels