Disable and enable a time field:
<!DOCTYPE html> <html> <body> <input type="time" id="myTime"><br><br> <button onclick="disableBtn()">Disable Time Field</button> <button onclick="enableBtn()">enable Time Field</button> <script> function disableBtn() {//from ww w . j ava 2s .c om document.getElementById("myTime").disabled = true; } function enableBtn() { document.getElementById("myTime").disabled = false; } </script> </body> </html>