forked from commonpike/add-to-calendar-buttons
-
Notifications
You must be signed in to change notification settings - Fork 1
/
tester.html
216 lines (186 loc) · 5.62 KB
/
tester.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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
<!DOCTYPE html>
<html>
<head>
<script src="add-to-calendar.min.js"></script>
<style>
html, body {
font-family:sans-serif;
}
</style>
<link rel="stylesheet" type="text/css" id="add-to-calendar-css" href="add-to-calendar.css">
<title>OUICal2 Add to Calendar OUI2 Add To Calender Test</title>
</head>
<body>
<h1>OUICal2 Add to Calendar</h1>
<p><b>Created by javascript:</b></p>
<div>
<b>Dec 31st, 2018 19:00</b>
<div id="cal01"></div>
</div>
<div>
<b>Dec 31st, 2018 19:00, 45 minutes</b>
<div id="cal02"></div>
</div>
<div>
<b>Dec 31st, 2018 19:00 - 21:00</b>
<div id="cal03"></div>
</div>
<div>
<b>Dec 31st, 2018, All day</b>
<div id="cal04"></div>
</div>
<div>
<b>Dec 31st, 2018 19:00, Toronto</b>
<div id="cal05"></div>
</div>
<div>
<b>Dec 31st, 2018 19:00, 45 minutes, Toronto</b>
<div id="cal06"></div>
</div>
<div>
<b>Dec 31st, 2018 19:00 - 21:00, Toronto</b>
<div id="cal07"></div>
</div>
<div>
<b>Dec 31st, 2018, All day, Toronto</b>
<div id="cal08"></div>
</div>
<script>
// create a calendar by hand
var cal01 = addToCalendar({
data: {
title: 'OUI2 Add To Calender Test 01',
start: new Date('Dec 31, 2018 19:00')
}
});
document.getElementById('cal01').appendChild(cal01);
var cal02 = addToCalendar({
data: {
title: 'OUI2 Add To Calender Test 02',
start: new Date('Dec 31, 2018 19:00'),
duration:45
}
});
document.getElementById('cal02').appendChild(cal02);
var cal03 = addToCalendar({
data: {
title: 'OUI2 Add To Calender Test 03',
start: new Date('Dec 31, 2018 19:00'),
end: new Date('Dec 31, 2018 21:00')
}
});
document.getElementById('cal03').appendChild(cal03);
var cal04 = addToCalendar({
data: {
title: 'OUI2 Add To Calender Test 04',
start: new Date('Dec 31, 2018 19:00'),
allday: true
}
});
document.getElementById('cal04').appendChild(cal04);
var cal05 = addToCalendar({
data: {
title: 'OUI2 Add To Calender Test 05',
start: new Date('Dec 31, 2018 19:00'),
timezone:'America/Toronto'
}
});
document.getElementById('cal05').appendChild(cal05);
var cal06 = addToCalendar({
data: {
title: 'OUI2 Add To Calender Test 06',
start: new Date('Dec 31, 2018 19:00'),
duration:45,
timezone:'America/Toronto'
}
});
document.getElementById('cal06').appendChild(cal06);
var cal07 = addToCalendar({
data: {
title: 'OUI2 Add To Calender Test 07',
start: new Date('Dec 31, 2018 19:00'),
end: new Date('Dec 31, 2018 21:00'),
timezone:'America/Toronto'
}
});
document.getElementById('cal07').appendChild(cal07);
var cal08 = addToCalendar({
data: {
title: 'OUI2 Add To Calender Test 08',
start: new Date('Dec 31, 2018 19:00'),
allday: true,
timezone:'America/Toronto'
}
});
document.getElementById('cal08').appendChild(cal08);
</script>
<hr>
<p><b>Created by html:</b></p>
<div>
<b>Dec 31st, 2018 19:00</b>
<div title="Add to Calendar" class="add-to-calendar">
<span class="title">OUI2 Add To Calender Test 01</span>
<span class="start">12/31/2018 19:00</span>
</div>
</div>
<div>
<b>Dec 31st, 2018 19:00, 45 minutes</b>
<div title="Add to Calendar" class="add-to-calendar">
<span class="title">OUI2 Add To Calender Test 02</span>
<span class="start">12/31/2018 19:00</span>
<span class="duration">45</span>
</div>
</div>
<div>
<b>Dec 31st, 2018 19:00 - 21:00</b>
<div title="Add to Calendar" class="add-to-calendar">
<span class="title">OUI2 Add To Calender Test 03</span>
<span class="start">12/31/2018 19:00</span>
<span class="end">12/31/2018 21:00</span>
</div>
</div>
<div>
<b>Dec 31st, 2018, All day</b>
<div title="Add to Calendar" class="add-to-calendar">
<span class="title">OUI2 Add To Calender Test 04</span>
<span class="start">12/31/2018 19:00</span>
<span class="allday">true</span>
</div>
</div>
<div>
<b>Dec 31st, 2018 19:00, Toronto</b>
<div title="Add to Calendar" class="add-to-calendar">
<span class="title">OUI2 Add To Calender Test 05</span>
<span class="start">12/31/2018 19:00</span>
<span class="timezone">America/Toronto</span>
</div>
</div>
<div>
<b>Dec 31st, 2018 19:00, 45 minutes, Toronto</b>
<div title="Add to Calendar" class="add-to-calendar">
<span class="title">OUI2 Add To Calender Test 06</span>
<span class="start">12/31/2018 19:00</span>
<span class="duration">45</span>
<span class="timezone">America/Toronto</span>
</div>
</div>
<div>
<b>Dec 31st, 2018 19:00 - 21:00, Toronto</b>
<div title="Add to Calendar" class="add-to-calendar">
<span class="title">OUI2 Add To Calender Test 07</span>
<span class="start">12/31/2018 19:00</span>
<span class="end">12/31/2018 21:00</span>
<span class="timezone">America/Toronto</span>
</div>
</div>
<div>
<b>Dec 31st, 2018, All day, Toronto</b>
<div title="Add to Calendar" class="add-to-calendar">
<span class="title">OUI2 Add To Calender Test 08</span>
<span class="start">12/31/2018 19:00</span>
<span class="allday">true</span>
<span class="timezone">America/Toronto</span>
</div>
</div>
</body>
</html>