xxxxxxxxxx
1
<!DOCTYPE html>
2
<html lang="en">
3
4
<head>
5
<meta charset="UTF-8">
6
<meta http-equiv="X-UA-Compatible" content="IE=edge">
7
<meta name="viewport" content="width=device-width, initial-scale=1.0">
8
<title>Try it your self</title>
9
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.0/dist/css/bootstrap.min.css" rel="stylesheet"
10
integrity="sha384-gH2yIJqKdNHPEq0n4Mqa/HGKIhSkIHeL5AyhkYV8i59U5AR6csBvApHHNl/vI1Bx" crossorigin="anonymous">
11
12
<link rel="stylesheet" href="https://code.jquery.com/ui/1.13.2/themes/base/jquery-ui.css">
13
14
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.0/dist/js/bootstrap.bundle.min.js"
15
integrity="sha384-A3rJD856KowSb7dwlZdYEkO39Gagi7vIsF0jrRAoQmDKKtQBHUuLZ9AsSv4jD4Xa"
16
crossorigin="anonymous"></script>
17
18
19
<script src="https://code.jquery.com/jquery-3.6.0.js"></script>
20
<script src="https://code.jquery.com/ui/1.13.2/jquery-ui.js"></script>
21
<style>
22
input {
23
max-width: 400px;
24
}
25
</style>
26
</head>
27
28
<body>
29
<div class="col-md-10 bg-light border p-3 my-3">
30
<div class="form-group">
31
<h3> EX 02: Enabled Monday and Friday</h3>
32
<label for="datepicker_c2">Select date</label>
33
<input type="text" name="" id="datepicker_c2" class="form-control" placeholder="select date">
34
</div>
35
</div>
36
<script>
37
//Enabled Monday and Friday
38
function enabledDays(date) {
39
/* 0= sunday, 1= Monday, 2=tuesday, 3= wednesday, 4=thursday, 5=friday, 6=suturday */
40
if (date.getDay() === 1 || date.getDay() === 5) {
41
return [true, "", "Available"]
42
}
43
44
else {
45
return [false, "", "Closed"]
46
}
47
48
}