| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119 |
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset='utf-8' />
- <link href='../packages-premium/bundle/dist/main.css' rel='stylesheet' />
- <script src='../packages-premium/bundle/dist/main.js'></script>
- <script>
- document.addEventListener('DOMContentLoaded', function() {
- var calendarEl = document.getElementById('calendar');
- var calendar = new FullCalendar.Calendar(calendarEl, {
- // resourceAreaHeaderContent: function(arg) { console.log('resourceAreaHeaderContent', arg); return 'label' },
- // resourceAreaHeaderDidMount: function(arg) { console.log('resourceAreaHeaderDidMount', arg) },
- // resourceLabelContent: function(arg) { console.log('resourceLabelContent', arg); return 'label' },
- // resourceLabelDidMount: function(arg) { console.log('resourceLabelDidMount', arg) },
- // resourceLaneContent: function(arg) { console.log('resourceLaneContent', arg); return 'lane' },
- // resourceLaneDidMount: function(arg) { console.log('resourceLaneDidMount', arg) },
- // slotLabelContent: function(arg) { console.log('slotLabelContent', arg); return 'label' },
- // slotLabelDidMount: function(arg) { console.log('slotLabelDidMount', arg) },
- // slotLaneContent: function(arg) { console.log('slotLaneContent', arg); return 'lane' },
- // slotLaneDidMount: function(arg) { console.log('slotLaneDidMount', arg) },
- // navLinks: true,
- // viewDidMount: function(arg) { console.log('viewDidMount', arg) },
- // viewWillUnmount: function(arg) { console.log('viewWillUnmount', arg) },
- // nowIndicatorContent: 'sup',
- // nowIndicator: true,
- now: '2020-02-07',
- scrollTime: '00:00', // undo default 6am scrollTime
- editable: true, // enable draggable events
- selectable: true,
- aspectRatio: 1.8,
- headerToolbar: {
- left: 'today prev,next',
- center: 'title',
- right: 'resourceTimelineDay,resourceTimelineThreeDays,timeGridWeek,dayGridMonth,listWeek'
- },
- initialView: 'resourceTimelineDay',
- views: {
- resourceTimelineThreeDays: {
- type: 'resourceTimeline',
- duration: { days: 3 },
- buttonText: '3 days'
- }
- },
- resourceAreaHeaderContent: 'Rooms',
- resources: [
- { id: 'a', title: 'Auditorium A' },
- { id: 'b', title: 'Auditorium B', eventColor: 'green' },
- { id: 'c', title: 'Auditorium C', eventColor: 'orange' },
- { id: 'd', title: 'Auditorium D', children: [
- { id: 'd1', title: 'Room D1' },
- { id: 'd2', title: 'Room D2' }
- ] },
- { id: 'e', title: 'Auditorium E' },
- { id: 'f', title: 'Auditorium F', eventColor: 'red' },
- { id: 'g', title: 'Auditorium G' },
- { id: 'h', title: 'Auditorium H' },
- { id: 'i', title: 'Auditorium I' },
- { id: 'j', title: 'Auditorium J' },
- { id: 'k', title: 'Auditorium K' },
- { id: 'l', title: 'Auditorium L' },
- { id: 'm', title: 'Auditorium M' },
- { id: 'n', title: 'Auditorium N' },
- { id: 'o', title: 'Auditorium O' },
- { id: 'p', title: 'Auditorium P' },
- { id: 'q', title: 'Auditorium Q' },
- { id: 'r', title: 'Auditorium R' },
- { id: 's', title: 'Auditorium S' },
- { id: 't', title: 'Auditorium T' },
- { id: 'u', title: 'Auditorium U' },
- { id: 'v', title: 'Auditorium V' },
- { id: 'w', title: 'Auditorium W' },
- { id: 'x', title: 'Auditorium X' },
- { id: 'y', title: 'Auditorium Y' },
- { id: 'z', title: 'Auditorium Z' }
- ],
- events: [
- { id: '1', resourceId: 'b', start: '2020-02-07T02:00:00', end: '2020-02-07T07:00:00', title: 'event 1' },
- { id: '2', resourceId: 'c', start: '2020-02-07T05:00:00', end: '2020-02-07T22:00:00', title: 'event 2' },
- { id: '3', resourceId: 'd', start: '2020-02-06', end: '2020-02-08', title: 'event 3' },
- { id: '4', resourceId: 'e', start: '2020-02-07T03:00:00', end: '2020-02-07T08:00:00', title: 'event 4' },
- { id: '5', resourceId: 'f', start: '2020-02-07T00:30:00', end: '2020-02-07T02:30:00', title: 'event 5' }
- ]
- });
- calendar.render();
- });
- </script>
- <style>
- body {
- margin: 0;
- padding: 0;
- font-family: Arial, Helvetica Neue, Helvetica, sans-serif;
- font-size: 14px;
- }
- #calendar {
- max-width: 1100px;
- margin: 50px auto;
- }
- </style>
- </head>
- <body>
- <div id='calendar'></div>
- </body>
- </html>
|