Before HTML5 we were forced into creating custom controls that always had some missing features or were not compatible with some browsers. Now, there are separate input types for dates, and in this recipe we will see how to use them. They are unfortunately still not fully implemented across various user agents, but then everyone is slowly catching up.
We will simply create a basic HTML document and create a form in the body element:
formand inside it a
<form> <label> Select date <input name="theDate" type="date"> </label>
<label> Select month <input name="theMonth" type="month"> </label> <label> Select week <input ...