Edit This Code:
<!DOCTYPE html>
<html>
<body>

Time: <input type="time" id="myTime" value="16:32:55">

<p>Click the button to change the default value of the time field.</p>

<button type="button" onclick="myFunction()">Try it</button>

<script>
function myFunction() {
    document.getElementById("myTime").defaultValue = "18:00";
}
</script>

</body>
</html>


Result:
Try it Yourself - © w3schools.com
Privacy Policy