Show Output
<!DOCTYPE html> <html lang="en"> <head> <title>HTML5 Date Input Type</title> <script> function getValue() { var date = document.getElementById("mydate").value; alert(date); } </script> </head> <body> <form> <label for="mydate">Select Date:</label> <input type="date" value="2019-04-15" id="mydate"> <button type="button" onclick="getValue();">Get Value</button> </form> </body> </html>