<input type="date" name="bday" id="biday" required>
I have to take the date from input type date field from the user and if the entered date is greater than the current date i have to print some error in the alert box. I Have tried various methods but none of them worked for input type date. I tried to take two variables one which stores the current date and the second which takes the value of date input element `
var startDate = Date(document.getElementByID('biday').value);
var today = new Date();
if (startDate > today) {
alert("The first date is after the second date!");
`.Can someone please help me the procedure to get the task done.