Skip to content

Commit 6c005e7

Browse files
author
Michiel Nugter
committed
add date and time fields
1 parent 105c1b8 commit 6c005e7

1 file changed

Lines changed: 35 additions & 0 deletions

File tree

src/Element/Input.elm

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ module Element.Input exposing
33
, button
44
, checkbox, defaultCheckbox
55
, text, multiline
6+
, date, time
67
, Placeholder, placeholder
78
, username, newPassword, currentPassword, email, search, spellChecked
89
, slider, Thumb, thumb, defaultThumb
@@ -1407,6 +1408,40 @@ text =
14071408
, autofill = Nothing
14081409
}
14091410

1411+
{-| -}
1412+
date :
1413+
List (Attribute msg)
1414+
->
1415+
{ onChange : String -> msg
1416+
, text : String
1417+
, placeholder : Maybe (Placeholder msg)
1418+
, label : Label msg
1419+
}
1420+
-> Element msg
1421+
date =
1422+
textHelper
1423+
{ type_ = TextInputNode "date"
1424+
, spellchecked = False
1425+
, autofill = Nothing
1426+
}
1427+
1428+
{-| -}
1429+
time :
1430+
List (Attribute msg)
1431+
->
1432+
{ onChange : String -> msg
1433+
, text : String
1434+
, placeholder : Maybe (Placeholder msg)
1435+
, label : Label msg
1436+
}
1437+
-> Element msg
1438+
time =
1439+
textHelper
1440+
{ type_ = TextInputNode "time"
1441+
, spellchecked = False
1442+
, autofill = Nothing
1443+
}
1444+
14101445

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

0 commit comments

Comments
 (0)