aforemny / aforemny/material-components-web-elm

TextField setMin and setMax should take String, not Int

オープン
#161 コメント 2 件 リアクション 1 件 担当者 0 名 GitHub で見る
主要言語
Elm
スター
93
フォーク
20
PR マージ指標
30日以内にマージされた PR はありません

説明

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

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。