Is it possible to bind value of a HTML5 <input type="date"> to a JSF managed bean property?
This is only possible since JSF 2.2. This feature is known as "passthrough elements".
<html xmlns:jsf="http://xmlns.jcp.org/jsf">
...
<input type="date" jsf:value="#{bean.date}" />
Alternatively, use "passthrough attributes".
<html xmlns:a="http://xmlns.jcp.org/jsf/passthrough">
...
<h:inputText a:type="date" value="#{bean.date}" />
In older JSF versions, use a custom component and/or renderer. You can find links to examples in Custom HTML tag attributes are not rendered by JSF.
Another way (works only with JSF 2.2) is to use the f:passThroughAttribute
inside your inputText:
<h:inputText id="yourNumberField" value="#{mainController.myBeautifulNumber}">
<f:passThroughAttribute name="type" value="number"/>
<f:passThroughAttribute name="step" value="0.02"/>
</h:inputText>
The f:
namespace is the default xmlns:f="http://xmlns.jcp.org/jsf/core"
.