Q:

JS: Validate if there's existing current date from the table [UPDATED]

So I have a table, where it shows the list of dates and other important details per rows. What I want to do is to validate if the date in the table matches the current date(The present date) and if matches it will automatically disable the  input date element.
Here's my code
<table>
   <tr>
      <td><input type="text" class="form-control" name="date'.$counter.'" id="date'.$counter.'"></td>
      <td><input type="text" class="form-control" name="timein'.$counter.'" id="timein'.$counter.'"></td>
      <td><input type="text" class="form-control" name="timeout'.$counter.'" id="timeout'.$counter.'"></td>
   <tr>
</table>

Here's my JS Code:
//This will get the current date

var curDate = new Date();
var dd = String(curDate.getDate()).padStart(2, '0');
var mm = String(curDate.getMonth() + 1).padStart(2, '0'); //January is 0!
var yyyy = curDate.getFullYear();
curDate = yyyy + '-' + mm + '-' + dd;

//This will get the current date

 for(i = 1; i <=100; i++){
 var dateApplied = $('#dateApplied' + i).val();

 if (dateApplied = curDate){
     $('#dateApplied' + i).disabled = true;
     $('#timein' + i).disabled = true;
     $('#timeout' + i).disabled = true;
  }
  }

A:

 
//This will get the current date

var curDate = new Date();

var dd = String(curDate.getDate()).padStart(2, '0');
var mm = String(curDate.getMonth() + 1).padStart(2, '0'); //January is 0!
var yyyy = curDate.getFullYear();
curDate = yyyy + '-' + mm + '-' + dd;

//This will get the current date

 for(i = 1; i <=100; i++){
 var dateApplied = $('#date' + i).val();



 if (dateApplied == curDate){
     $('#date' + i).attr('disabled','disabled');
     
  }
  }
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<table>
   <tr>
      <td><input type="text" class="form-control" name="" id="date1" value="2019-04-05"></td>
      <td><input type="text" class="form-control" name="" id="timein1"></td>
      <td><input type="text" class="form-control" name="" id="timeout1"></td>
   </tr>
   <tr>
      <td><input type="text" class="form-control" name="" id="date2" value="2019-04-06"></td>
      <td><input type="text" class="form-control" name="" id="timein2"></td>
      <td><input type="text" class="form-control" name="" id="timeout2"></td>
   </tr>
</table>

