JS is not needed - we read , understand, we understand that there is an attribute min and max .
Example: <input type="date" min="2015-01-01" max="2016-01-01" /> .
Value: 2015-03-01 .
In PHP, you can use DateTime : https://php.net/manual/ru/datetime.diff.php
Restrict days like "Sunday" - there must be considered.
For example:
$dayOfWeek = ["вс", "пн", "вт", "ср", "чт", "пт", "сб"]; $str = $dayOfWeek [date("w", mktime (0, 0, 0, $cur_month, $cur_day, $cur_year))];
Or this: Determine the day of the week by date