I need to check the current date with the date we enter in the input element.
Html code:
<input type="date" name="date" id="date>
I can get the today's date by the following code in javascript:
function todayDate() {
   var today = new Date();
   var dd = String(today.getDate()).padStart(2, '0');
   var mm = String(today.getMonth() + 1).padStart(2, '0'); 
   var yyyy = today.getFullYear();
   let date=dd+'/'+mm+'/'+yyyy;
   return date;
 }
Now how to check the input date with the current date?
 
     
    