i have problem to set min date attribute, on single page i have 25+ input type date for different products. I can see value of attribute min is set to today date, but i can pick date before today(fields are not disabled)
let today = new Date();
let dd = today.getDate();
let mm = today.getMonth() + 1;
let yyyy = today.getFullYear();
let dateList = $('.pickupdate');
let list = dateList.length;
let index = 0;
today = yyyy + '-' + mm + '-' + dd;
for (index = 0; index < list; ++index) {
let dateList2 = dateList[index];
$(dateList2).attr('min', today);
dateList[index];
}
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<input
id="pickupdate"
type="date"
class="date-basic font-w-500 clr-white pickup m-0 datechk pickupdate"
name="pickupdate"
placeholder="dd/mm/yyyy"
min="1899-01-01" max=""
value="{{$request->pickupdate}}"
required
/>