-
-
Notifications
You must be signed in to change notification settings - Fork 40
/
Copy pathindex.html
52 lines (50 loc) · 1.97 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Simple Calendar</title>
<link href='https://fonts.googleapis.com/css?family=Lato' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="dist/simple-calendar.css">
<link rel="stylesheet" href="assets/demo.css">
</head>
<body>
<h1 class="title">Simple Calendar</h1>
<div id="container" class="calendar-container"></div>
<script src="https://code.jquery.com/jquery-2.2.4.min.js"
integrity="sha256-BbhdlvQf/xTY9gja0Dq3HiwQF8LaCRTXxZKRutelT44="
crossorigin="anonymous"></script>
<script src="dist/jquery.simple-calendar.js"></script>
<script>
var $calendar;
$(document).ready(function () {
let container = $("#container").simpleCalendar({
fixedStartDay: 0, // begin weeks by sunday
disableEmptyDetails: true,
events: [
// generate new event after tomorrow for one hour
{
startDate: new Date(new Date().setHours(new Date().getHours() + 24)).toDateString(),
endDate: new Date(new Date().setHours(new Date().getHours() + 25)).toISOString(),
summary: 'Visit of the Eiffel Tower'
},
// generate new event for yesterday at noon
{
startDate: new Date(new Date().setHours(new Date().getHours() - new Date().getHours() - 12, 0)).toISOString(),
endDate: new Date(new Date().setHours(new Date().getHours() - new Date().getHours() - 11)).getTime(),
summary: 'Restaurant'
},
// generate new event for the last two days
{
startDate: new Date(new Date().setHours(new Date().getHours() - 48)).toISOString(),
endDate: new Date(new Date().setHours(new Date().getHours() - 24)).getTime(),
summary: 'Visit of the Louvre'
}
],
});
$calendar = container.data('plugin_simpleCalendar')
});
</script>
</body>
</html>