Add type="time" to timeField
This commit is contained in:
parent
4ee1eb17cd
commit
1944f02c84
@ -160,7 +160,7 @@ timeField = Field
|
|||||||
{ fieldParse = parseHelper parseTime
|
{ fieldParse = parseHelper parseTime
|
||||||
, fieldView = \theId name attrs val isReq -> toWidget [hamlet|
|
, fieldView = \theId name attrs val isReq -> toWidget [hamlet|
|
||||||
$newline never
|
$newline never
|
||||||
<input id="#{theId}" name="#{name}" *{attrs} :isReq:required="" value="#{showVal val}">
|
<input id="#{theId}" name="#{name}" *{attrs} type="time" :isReq:required="" value="#{showVal val}">
|
||||||
|]
|
|]
|
||||||
, fieldEnctype = UrlEncoded
|
, fieldEnctype = UrlEncoded
|
||||||
}
|
}
|
||||||
|
|||||||
@ -26,7 +26,7 @@ mkYesod "HelloForms" [parseRoutes|
|
|||||||
/file FileR GET POST
|
/file FileR GET POST
|
||||||
|]
|
|]
|
||||||
|
|
||||||
myForm = fixType $ runFormGet $ renderDivs $ pure (,,,,,,,,,,,)
|
myForm = fixType $ runFormGet $ renderDivs $ pure (,,,,,,,,,,,,)
|
||||||
<*> pure "pure works!"
|
<*> pure "pure works!"
|
||||||
<*> areq boolField "Bool field" Nothing
|
<*> areq boolField "Bool field" Nothing
|
||||||
<*> aopt boolField "Opt bool field" Nothing
|
<*> aopt boolField "Opt bool field" Nothing
|
||||||
@ -39,6 +39,7 @@ myForm = fixType $ runFormGet $ renderDivs $ pure (,,,,,,,,,,,)
|
|||||||
<*> aopt (radioFieldList fruits) "Opt radio" Nothing
|
<*> aopt (radioFieldList fruits) "Opt radio" Nothing
|
||||||
<*> aopt multiEmailField "Opt multi email" Nothing
|
<*> aopt multiEmailField "Opt multi email" Nothing
|
||||||
<*> areq nicHtmlField "NIC HTML" Nothing
|
<*> areq nicHtmlField "NIC HTML" Nothing
|
||||||
|
<*> aopt timeField "Opt Time" Nothing
|
||||||
|
|
||||||
instance Show Html where
|
instance Show Html where
|
||||||
show = renderHtml
|
show = renderHtml
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user