aforemny / aforemny/material-components-web-elm

TextField setMin and setMax should take String, not Int

Aberta
#161 2 comentários 1 reação 0 responsáveis Ver no GitHub
Linguagem predominante
Elm
Estrelas
93
Forks
20
Métricas de merge de PRs
Nenhum PR com merge em 30d

Descrição

[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 | `` | ``

Guia de contribuição

Nenhum guia de contribuição indexado para este repositório

Avaliação

Esta issue ainda não foi avaliada.

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.