screen_rotation
Copied to Clipboard
<!DOCTYPE html> <html> <head></head> <body> <h3>Javascript Check Date null </h3> <input type="date" id="myDateInput" /> <button onclick="checkDateInput()">Check</button> <script> function checkDateInput() { var dateInput = document.getElementById("myDateInput"); if (dateInput.value === "") { alert("Date input is empty"); } else { alert("Date input is not empty"); } } </script> </body> </html>