I need to be able to add a validation (alertbox) if the user selects a previous date from the calendar.
Today's date is 13/11/2015
. If the user was to select 12/11/2015
it should display an alert box saying "Please enter a valid date."
I've looked online and can't seem to find anything to do with this.
Can this be done with javascript?
<input type="date" id="leaveDate">
<script>
alert("Please enter a valid date.");
</script>