Jquery Disabled Dates next working days not showing
Hi,
I am using the below code for displaying datepicker with disabling friday, Saturday and max date: 2 days, but it should show next 2 working days after disabling days.
Code:
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>jQuery UI Datepicker - Restrict date range</title>
<link rel="stylesheet" href="/resources/demos/style.css">
<script>
function DisableMonday(date) {
alert(date);
var day = date.getDay();
// If day == 1 then it is MOnday
if (day == 5 || day==6) {
return [false] ;
} else {
return [true] ;
}
}
$(function() {
$( "#datepicker" ).datepicker({
minDate: "1D", maxDate: "+2D",
beforeShowDay: DisableMonday
});
});
</script>
</head>
<body>
<p>Date: <input type="text" id="datepicker"></p>
</body>
</html>