Settings for JS Datepicker only allow Weekdays and Future Days

Date: 02/10/2017, Author: Lostwake, Category: JavaScript

Here is how it is done

<p>Date: <input type="text" id="datepicker"></p>

$("#datepicker").datepicker({
beforeShowDay: function(date) {
var day = date.getDay();
return [day == 1 || day == 2 || day == 3 || day == 4 || day == 5,""];
},
minDate: 1
});

Comments: