aforemny / aforemny/material-components-web-elm

TextField setMin and setMax should take String, not Int

Abierto
#161 2 comentarios 1 reacción 0 asignados Ver en GitHub
Lenguaje dominante
Elm
Estrellas
93
Forks
20
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

[setMin](https://package.elm-lang.org/packages/aforemny/material-components-web-elm/latest/Material-TextField#setMin) and [setMax](https://package.elm-lang.org/packages/aforemny/material-components-web-elm/latest/Material-TextField#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](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/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 | ``
month | yyyy-mm | ``
week | yyyy-W## | ``
time | hh:mm | ``
datetime-local | yyyy-mm-ddThh:mm | ``
number | `` | ``
range | `` | ``

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.