0
Hello, in my form I created a calendar with the tag input type=date
in my html
, I blocked the 3 days from the current date and would like to block Saturdays and Sundays to display only weekdays of the week, someone knows how to do or has some tip on how to do?
Follow what I’ve done so far:
Add 3 days to date
$data = date('Y-m-d', strtotime('+3 days', strtotime(date('Y-m-d'))));
simplified html
<input type="date" id="venc_via2" name="venc_via2" min="<?= $data; ?>">
Grateful for the attention.
It is not using any framework, but most of them come with a function that searches the days of the week (from 0 until 6), being 0-Sunday and 6-Saturday. In JS it would look like this answer: https://stackoverflow.com/questions/49863189/disable-weekends-on-html-5-input-type-date
– Edward Ramos
@Edwardramos thanks, worked the way I want.
– smourao