Disable and enable a date field:
<!DOCTYPE html> <html> <body> <input type="date" id="myDate"><br><br> <button onclick="disableBtn()">Disable Date Field</button> <button onclick="enableBtn()">enable Date Field</button> <script> function disableBtn() {//from w w w .ja va 2 s .c om document.getElementById("myDate").disabled = true; } function enableBtn() { document.getElementById("myDate").disabled = false; } </script> </body> </html>