JSFiddle - React, Tailwind, and code Playground
HTML
<input id="startdate" />
JavaScript
var fullDate = new Date();
var twoDigitMonth = ((fullDate.getMonth().length+1) === 1)? (fullDate.getMonth()+1) : '0' + (fullDate.getMonth()+1);
$('#startdate').datepicker({
maxDate: fullDate.getDate() + "/" + twoDigitMonth + "/" + fullDate.getFullYear(),
beforeShowDay: disableSpecificWeekDays
});
function disableSpecificWeekDays(date) {
if(date.getDay()==0){
return [true];
}else{
return [false];
}
}