uncover-co / elm-widgets / W.InputDate

view : List (Attribute msg) -> { value : Value, onInput : Value -> msg } -> Html msg

Value

init : Time.Zone -> Maybe Time.Posix -> Value

toDate : Value -> Maybe Time.Posix

toTimeZone : Value -> Time.Zone

toString : Value -> String


type Value

States

autofocus : Attribute msg

disabled : Basics.Bool -> Attribute msg

readOnly : Basics.Bool -> Attribute msg

Styles

small : Attribute msg

prefix : List (Html msg) -> Attribute msg

suffix : List (Html msg) -> Attribute msg

Validation Attributes

min : Time.Posix -> Attribute msg

max : Time.Posix -> Attribute msg

required : Basics.Bool -> Attribute msg

View & Validation

viewWithValidation : List (Attribute msg) -> { value : Value, onInput : Result (List Error) (Maybe Time.Posix) -> Value -> msg } -> Html msg

errorToString : Error -> String


type Error
    = TooLow Time.Posix String
    | TooHigh Time.Posix String
    | ValueMissing String
    | BadInput String

Actions

onEnter : msg -> Attribute msg

onFocus : msg -> Attribute msg

onBlur : msg -> Attribute msg

Html

htmlAttrs : List (Html.Attribute msg) -> Attribute msg

noAttr : Attribute msg


type Attribute msg