setMin and setMax both have a type signature of Maybe Int -> Config msg -> Config msg, but I believe they should be Maybe String -> Config msg -> Config msg. Confusingly, the docs for min say, "the min attribute is a number that specifies the most negative value a form control to be considered valid." However, the examples are mostly strings, and I don't know how one would represent a minimal iso8601 date as anything other than a string. I have 2 PRs to update the MDN docs, assuming I'm not wrong about this.
From MDN:
| Input type |
Example |
Example |
| date |
yyyy-mm-dd |
<input type="date" min="2019-12-25" step="1"> |
| month |
yyyy-mm |
<input type="month" min="2019-12" step="12"> |
| week |
yyyy-W## |
<input type="week" min="2019-W23" step=""> |
| time |
hh:mm |
<input type="time" min="09:00" step="900"> |
| datetime-local |
yyyy-mm-ddThh:mm |
<input type="datetime-local" min="2019-12-25T19:30"> |
| number |
<number> |
<input type="number" min="0" step="5" max="100"> |
| range |
<number> |
<input type="range" min="60" step="5" max="100"> |
setMin and setMax both have a type signature of
Maybe Int -> Config msg -> Config msg, but I believe they should beMaybe String -> Config msg -> Config msg. Confusingly, the docs for min say, "the min attribute is a number that specifies the most negative value a form control to be considered valid." However, the examples are mostly strings, and I don't know how one would represent a minimal iso8601 date as anything other than a string. I have 2 PRs to update the MDN docs, assuming I'm not wrong about this.From MDN:
<input type="date" min="2019-12-25" step="1"><input type="month" min="2019-12" step="12"><input type="week" min="2019-W23" step=""><input type="time" min="09:00" step="900"><input type="datetime-local" min="2019-12-25T19:30"><number><input type="number" min="0" step="5" max="100"><number><input type="range" min="60" step="5" max="100">