xxxxxxxxxx
1
<div class="calendar" id="calendar"></div>
1
1
xxxxxxxxxx
1
const events = [
2
{
3
summary: 'JS Conference',
4
start: {
5
date: Calendar.dayjs().format('DD/MM/YYYY'),
6
},
7
end: {
8
date: Calendar.dayjs().format('DD/MM/YYYY'),
9
},
10
color: {
11
background: '#cfe0fc',
12
foreground: '#0a47a9',
13
},
14
},
15
{
16
summary: 'JS Conference',
17
start: {
18
date: Calendar.dayjs().format('DD/MM/YYYY'),
19
},
20
end: {
21
date: Calendar.dayjs().format('DD/MM/YYYY'),
22
},
23
color: {
24
background: '#cfe0fc',
25
foreground: '#0a47a9',
26
},
27
},
28
{
29
summary: 'JS Conference',
30
start: {
31
date: Calendar.dayjs().format('DD/MM/YYYY'),
32
},
33
end: {
34
date: Calendar.dayjs().format('DD/MM/YYYY'),
35
},
36
color: {
37
background: '#cfe0fc',
38
foreground: '#0a47a9',
39
},
40
},
41
{
42
summary: 'JS Conference',
43
start: {
44
date: Calendar.dayjs().format('DD/MM/YYYY'),
45
},
46
end: {
47
date: Calendar.dayjs().format('DD/MM/YYYY'),
48
},
49
color: {
50
background: '#cfe0fc',
51
foreground: '#0a47a9',
52
},
53
},
54
{
55
summary: 'JS Conference',
56
start: {
57
date: Calendar.dayjs().format('DD/MM/YYYY'),
58
},
59
end: {
60
date: Calendar.dayjs().format('DD/MM/YYYY'),
61
},
62
color: {
63
background: '#cfe0fc',
64
foreground: '#0a47a9',
65
},
66
},
67
{
68
summary: 'JS Conference',
69
start: {
70
date: Calendar.dayjs().format('DD/MM/YYYY'),
71
},
72
end: {
73
date: Calendar.dayjs().format('DD/MM/YYYY'),
74
},
75
color: {
76
background: '#cfe0fc',
77
foreground: '#0a47a9',
78
},
79
},
80
{
81
summary: 'JS Conference',
82
start: {
83
date: Calendar.dayjs().format('DD/MM/YYYY'),
84
},
85
end: {
86
date: Calendar.dayjs().format('DD/MM/YYYY'),
87
},
88
color: {
89
background: '#cfe0fc',
90
foreground: '#0a47a9',
91
},
92
},
93
{
94
summary: 'JS Conference',
95
start: {
96
date: Calendar.dayjs().format('DD/MM/YYYY'),
97
},
98
end: {
99
date: Calendar.dayjs().format('DD/MM/YYYY'),
100
},
101
color: {
102
background: '#cfe0fc',
103
foreground: '#0a47a9',
104
},
105
},
106
{
107
summary: 'Vue Meetup',
108
start: {
109
date: Calendar.dayjs().format('DD/MM/YYYY'),
110
},
111
end: {
112
date: Calendar.dayjs().add(5, 'day').format('DD/MM/YYYY'),
113
},
114
color: {
115
background: '#ebcdfe',
116
foreground: '#6e02b1',
117
},
118
},
119
{
120
summary: 'JS Conference',
121
start: {
122
date: Calendar.dayjs().format('DD/MM/YYYY'),
123
},
124
end: {
125
date: Calendar.dayjs().format('DD/MM/YYYY'),
126
},
127
color: {
128
background: '#cfe0fc',
129
foreground: '#0a47a9',
130
},
131
},
132
{
133
summary: 'Vue Meetup',
134
start: {
135
date: Calendar.dayjs().format('DD/MM/YYYY'),
136
},
137
end: {
138
date: Calendar.dayjs().add(5, 'day').format('DD/MM/YYYY'),
139
},
140
color: {
141
background: '#ebcdfe',
142
foreground: '#6e02b1',
143
},
144
},
145
{
146
summary: 'Angular Meetup',
147
description: 'Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur',
148
start: {
149
date: Calendar.dayjs().subtract(3, 'day').format('DD/MM/YYYY'),
150
dateTime: Calendar.dayjs().subtract(3, 'day').format('DD/MM/YYYY') + ' 10:00',
151
},
152
end: {
153
date: Calendar.dayjs().add(3, 'day').format('DD/MM/YYYY'),
154
dateTime: Calendar.dayjs().add(3, 'day').format('DD/MM/YYYY') + ' 14:00',
155
},
156
color: {
157
background: '#c7f5d9',
158
foreground: '#0b4121',
159
},
160
},
161
{
162
summary: 'React Meetup',
163
start: {
164
date: Calendar.dayjs().add(5, 'day').format('DD/MM/YYYY'),
165
},
166
end: {
167
date: Calendar.dayjs().add(8, 'day').format('DD/MM/YYYY'),
168
},
169
color: {
170
background: '#fdd8de',
171
foreground: '#790619',
172
},
173
},
174
{
175
summary: 'Meeting',
176
start: {
177
date: Calendar.dayjs().add(1, 'day').format('DD/MM/YYYY'),
178
dateTime: Calendar.dayjs().add(1, 'day').format('DD/MM/YYYY') + ' 8:00',
179
},
180
end: {
181
date: Calendar.dayjs().add(1, 'day').format('DD/MM/YYYY'),
182
dateTime: Calendar.dayjs().add(1, 'day').format('DD/MM/YYYY') + ' 12:00',
183
},
184
color: {
185
background: '#cfe0fc',
186
foreground: '#0a47a9',
187
},
188
},
189
{
190
summary: 'Call',
191
start: {
192
date: Calendar.dayjs().add(2, 'day').format('DD/MM/YYYY'),
193
dateTime: Calendar.dayjs().add(2, 'day').format('DD/MM/YYYY') + ' 11:00',
194
},
195
end: {
196
date: Calendar.dayjs().add(2, 'day').format('DD/MM/YYYY'),
197
dateTime: Calendar.dayjs().add(2, 'day').format('DD/MM/YYYY') + ' 14:00',
198
},
199
color: {
200
background: '#292929',
201
foreground: '#f5f5f5',
202
},
203
}
204
];
205
206
const calendarElement = document.getElementById('calendar');
207
const calendarInstance = Calendar.getInstance(calendarElement);
208
calendarInstance.addEvents(events);
Console errors: 0