control date :
Input Type: date The date type is used for input fields that should contain a date. Depending on browser support, a date picker can show up in the input field.
| syntax | <input type="date" name="name" > |
example
| Example | ||
|
<input type="date" id="inputDate" >
: date
<br /> <input type="button" id="btn1" value="set date" onclick="changeDate()" /> <br /> <div id="MyDiv"> </div> <script type="text/javascript"> function changeDate() { document.getElementById("MyDiv").innerHTML = "Time is : " + document.getElementById("inputDate").value; } </script> |
||
|
output : date |
||