How do you validate for a valid & empty input type=date field? I want to make sure that my date of birth field should not be = today's date or any date of today. Here are my codes
HTML
<label for="dob">Date of Birth:</label>
<input type="date" name="dob" id="dob" max="21/11/2017" required/>
JavaScript
else if (dob == "") {
alert("Please enter a date of birth");
$("#dob").focus();
validate = false;
}
The validation for the empty field doesn't work even though I use the same method for the other fields in my form.