Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 36 additions & 1 deletion src/Element/Input.elm
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ module Element.Input exposing
, button
, checkbox, defaultCheckbox
, text, multiline
, date, time
, Placeholder, placeholder
, username, newPassword, currentPassword, email, search, spellChecked
, slider, Thumb, thumb, defaultThumb
Expand Down Expand Up @@ -64,7 +65,7 @@ This is also the first input element that has a [`required label`](#Label).

# Text

@docs text, multiline
@docs text, multiline, date, time

@docs Placeholder, placeholder

Expand Down Expand Up @@ -1407,6 +1408,40 @@ text =
, autofill = Nothing
}

{-| -}
date :
List (Attribute msg)
->
{ onChange : String -> msg
, text : String
, placeholder : Maybe (Placeholder msg)
, label : Label msg
}
-> Element msg
date =
textHelper
{ type_ = TextInputNode "date"
, spellchecked = False
, autofill = Nothing
}

{-| -}
time :
List (Attribute msg)
->
{ onChange : String -> msg
, text : String
, placeholder : Maybe (Placeholder msg)
, label : Label msg
}
-> Element msg
time =
textHelper
{ type_ = TextInputNode "time"
, spellchecked = False
, autofill = Nothing
}


{-| If spell checking is available, this input will be spellchecked.
-}
Expand Down