'Input type date, disable a range of dates/holidays
I know it might not be possible to use only HTML5 and JavaScript Also, we can use custom validation but that won't make the dates disabled in the calendar. Still wondering if we can keep the basic HTML date picker styling but use some library like the JQuery date picker for disabling the holidays.
I'm currently using this input element,
<input type="date" class="form-control" id="datum" name="date" placeholder="" required min="<?php echo date("Y-m-d");?>" max="2022-04-16">
it's disabling all dates after April 16th but I need to disable only from 16th to 28th additionally if possible also disable past dates.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
