Good Day Everyone,
I would like to seek your help in displaying the current date to input type"date" when button is click.
format is like this  or mm/dd/yyyy. thank you
$(function() {
  $('#btncheckout').click(function() {
    var time = new Date();
    $('subdateout').val(time.toDateString());
  });
});<div class="input-group-sm mb-3 row align-middle ">
  <input type="date" name="subdateout" id="subdateout" class="form-control rounded-0 w3-tiny" max="<?php echo date('Y-m-d');?>" value="">
</div>
<div class="col-sm-3">
  <button type="button" id="btncheckout" class="btn btn-primary btn-sm rounded-0">Check Out</button>
</div>
</div> 
     
    