georgesboris/elm-widgets-alpha/2.0.0

NOTE: the latest version is 4.18.3

W.InputDate

List (Attribute msg)
-> { value : Value
, onInput : Value -> msg
}
-> Html msg
type alias Attribute msg =
Attr (Attributes msg)

Value

init : Zone -> Maybe Posix -> Value
toDate : Value -> Maybe Posix
toTimeZone : Value -> Zone
toString : Value -> String
type Value

States

autofocus : Attribute msg
disabled : Attribute msg
readOnly : Attribute msg

Styles

small : Attribute msg
prefix : List (Html msg) -> Attribute msg
suffix : List (Html msg) -> Attribute msg

Validation Attributes

min : Posix -> Attribute msg
max : Posix -> Attribute msg
required : Attribute msg

View & Validation

List (Attribute msg)
-> { value : Value
, onInput : Result (List Error) (Maybe Posix) -> Value -> msg
}
-> Html msg
errorToString : Error -> String
type Error
= TooLow Posix String
| TooHigh Posix String
| ValueMissing String
| BadInput String

Actions

onEnter : msg -> Attribute msg
onFocus : msg -> Attribute msg
onBlur : msg -> Attribute msg

Html

id : String -> Attribute msg