diff options
Diffstat (limited to 'public/js/fullcalendar/examples/background-events.html')
-rw-r--r-- | public/js/fullcalendar/examples/background-events.html | 101 |
1 files changed, 101 insertions, 0 deletions
diff --git a/public/js/fullcalendar/examples/background-events.html b/public/js/fullcalendar/examples/background-events.html new file mode 100644 index 0000000..911e0b3 --- /dev/null +++ b/public/js/fullcalendar/examples/background-events.html | |||
@@ -0,0 +1,101 @@ | |||
1 | <!DOCTYPE html> | ||
2 | <html> | ||
3 | <head> | ||
4 | <meta charset='utf-8' /> | ||
5 | <script src='../dist/index.global.js'></script> | ||
6 | <script> | ||
7 | |||
8 | document.addEventListener('DOMContentLoaded', function() { | ||
9 | var calendarEl = document.getElementById('calendar'); | ||
10 | |||
11 | var calendar = new FullCalendar.Calendar(calendarEl, { | ||
12 | headerToolbar: { | ||
13 | left: 'prev,next today', | ||
14 | center: 'title', | ||
15 | right: 'dayGridMonth,timeGridWeek,timeGridDay,listMonth' | ||
16 | }, | ||
17 | initialDate: '2023-01-12', | ||
18 | navLinks: true, // can click day/week names to navigate views | ||
19 | businessHours: true, // display business hours | ||
20 | editable: true, | ||
21 | selectable: true, | ||
22 | events: [ | ||
23 | { | ||
24 | title: 'Business Lunch', | ||
25 | start: '2023-01-03T13:00:00', | ||
26 | constraint: 'businessHours' | ||
27 | }, | ||
28 | { | ||
29 | title: 'Meeting', | ||
30 | start: '2023-01-13T11:00:00', | ||
31 | constraint: 'availableForMeeting', // defined below | ||
32 | color: '#257e4a' | ||
33 | }, | ||
34 | { | ||
35 | title: 'Conference', | ||
36 | start: '2023-01-18', | ||
37 | end: '2023-01-20' | ||
38 | }, | ||
39 | { | ||
40 | title: 'Party', | ||
41 | start: '2023-01-29T20:00:00' | ||
42 | }, | ||
43 | |||
44 | // areas where "Meeting" must be dropped | ||
45 | { | ||
46 | groupId: 'availableForMeeting', | ||
47 | start: '2023-01-11T10:00:00', | ||
48 | end: '2023-01-11T16:00:00', | ||
49 | display: 'background' | ||
50 | }, | ||
51 | { | ||
52 | groupId: 'availableForMeeting', | ||
53 | start: '2023-01-13T10:00:00', | ||
54 | end: '2023-01-13T16:00:00', | ||
55 | display: 'background' | ||
56 | }, | ||
57 | |||
58 | // red areas where no events can be dropped | ||
59 | { | ||
60 | start: '2023-01-24', | ||
61 | end: '2023-01-28', | ||
62 | overlap: false, | ||
63 | display: 'background', | ||
64 | color: '#ff9f89' | ||
65 | }, | ||
66 | { | ||
67 | start: '2023-01-06', | ||
68 | end: '2023-01-08', | ||
69 | overlap: false, | ||
70 | display: 'background', | ||
71 | color: '#ff9f89' | ||
72 | } | ||
73 | ] | ||
74 | }); | ||
75 | |||
76 | calendar.render(); | ||
77 | }); | ||
78 | |||
79 | </script> | ||
80 | <style> | ||
81 | |||
82 | body { | ||
83 | margin: 40px 10px; | ||
84 | padding: 0; | ||
85 | font-family: Arial, Helvetica Neue, Helvetica, sans-serif; | ||
86 | font-size: 14px; | ||
87 | } | ||
88 | |||
89 | #calendar { | ||
90 | max-width: 1100px; | ||
91 | margin: 0 auto; | ||
92 | } | ||
93 | |||
94 | </style> | ||
95 | </head> | ||
96 | <body> | ||
97 | |||
98 | <div id='calendar'></div> | ||
99 | |||
100 | </body> | ||
101 | </html> | ||