-
Notifications
You must be signed in to change notification settings - Fork 1
/
calTester1.html
112 lines (83 loc) · 3.26 KB
/
calTester1.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
<!DOCTYPE html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]> <html class="no-js"> <!--<![endif]-->
<html>
<head>
<script src="https://cdn.jsdelivr.net/npm/fullcalendar@5.10.1/main.min.js"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/fullcalendar@5.10.1/main.min.css">
<meta name="viewport" content="width=device-width, user-scalable=no">
<script src="https://thunkable.github.io/webviewer-extension/thunkableWebviewerExtension.js"
type="text/javascript"></script>
<body>
<style>
</style>
<div id='text'></div>
<div id='calendar'></div>
<script>
ThunkableWebviewerExtension.receiveMessage(function (message) {
// console.log(message);
let a = JSON.stringify(message.type)
let textHolder = document.getElementById("text")
textHolder.innerHTML = message;
let events = message.events
if (message.type == 'addAllEvents') {
calendar.addEventSource(events);
}
});
document.addEventListener('DOMContentLoaded', function () {
var calendarEl = document.getElementById('calendar');
var calendar = new FullCalendar.Calendar(calendarEl, {
headerToolbar: {
left: '',
center: 'title',
right: 'dayGridMonth timeGridWeek timeGridDay'
},
footerToolbar: {
left: 'prev next today',
},
allDaySlot: false,
navLinks: true, // can click day/week names to navigate views
selectable: true,
selectMirror: true,
dayMaxEvents:0,
moreLinkContent:function(args){
return '+ See All';
},
height: 'auto',
views: {
dayGrid: {
titleFormat: {
year: 'numeric',
month: 'short'
},
eventTimeFormat: {
hour: 'numeric',
minute: '2-digit',
omitZeroMinute: true,
meridiem: 'narrow'
}
},
timeGrid: {
// options apply to timeGridWeek and timeGridDay views
},
week: {
titleFormat: {
year: 'numeric',
month: 'short'
}
},
day: {
titleFormat: {
year: 'numeric',
month: 'short',
day: 'numeric' }
}
}
});
calendar.render();
});
</script>
</body>
</html>