forked from carlsednaoui/add-to-calendar-buttons
-
Notifications
You must be signed in to change notification settings - Fork 0
/
example.html
45 lines (43 loc) · 1.58 KB
/
example.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
<!DOCTYPE html>
<html>
<head>
<script src="ouical.js"></script>
<link rel="stylesheet" href="main.css">
<title>OuiCal Example</title>
</head>
<body>
<div class="new-cal"></div>
<div class="new-cal2"></div>
<script>
var myCalendar = createCalendar({
options: {
class: 'my-class',
id: 'my-id' // You need to pass an ID. If you don't, one will be generated for you.
},
data: {
title: 'Get on the front page of HN', // Event title
start: new Date('June 15, 2013 19:00'), // Event start date
duration: 120, // Event duration (IN MINUTES)
end: new Date('June 15, 2013 23:00'), // You can also choose to set an end time.
// If an end time is set, this will take precedence over duration
address: 'The internet',
description: 'Get on the front page of HN, then prepare for world domination.'
}
}),
myCalendar2 = createCalendar({
options: {
class: 'my-class' // Notice how this one does not have a preset ID
},
data: {
title: 'Go to the gym',
start: new Date('June 15, 2013 17:00'),
duration: 60,
address: 'Tough Boys Gym',
description: 'Work them biceps out.'
}
});
document.querySelector('.new-cal').appendChild(myCalendar);
document.querySelector('.new-cal2').appendChild(myCalendar2);
</script>
</body>
</html>