| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697 |
- <!DOCTYPE html>
- <html>
- <head>
- <meta charset='utf-8' />
- <link href='../packages-premium/bundle/main.css' rel='stylesheet' />
- <script src='../packages-premium/bundle/main.js'></script>
- <script>
- document.addEventListener('DOMContentLoaded', function() {
- var calendarEl = document.getElementById('calendar');
- var calendar = new FullCalendar.Calendar(calendarEl, {
- now: '2020-09-07',
- editable: true, // enable draggable events
- aspectRatio: 1.8,
- scrollTime: '00:00', // undo default 6am scrollTime
- headerToolbar: {
- left: 'today prev,next',
- center: 'title',
- right: 'resourceTimelineDay,resourceTimelineThreeDays,timeGridWeek,dayGridMonth'
- },
- initialView: 'resourceTimelineDay',
- views: {
- resourceTimelineThreeDays: {
- type: 'resourceTimeline',
- duration: { days: 3 },
- buttonText: '3 days'
- }
- },
- resourceAreaHeaderContent: 'Rooms',
- resources: { // you can also specify a plain string like 'json/resources.json'
- url: 'json/resources.json',
- failure: function() {
- document.getElementById('script-warning').style.display = 'block';
- }
- },
- events: { // you can also specify a plain string like 'json/events-for-resources.json'
- url: 'json/events-for-resources.json',
- failure: function() {
- document.getElementById('script-warning').style.display = 'block';
- }
- }
- });
- calendar.render();
- });
- </script>
- <style>
- body {
- margin: 0;
- padding: 0;
- font-family: Arial, Helvetica Neue, Helvetica, sans-serif;
- font-size: 14px;
- }
- #script-warning {
- display: none;
- background: #eee;
- border-bottom: 1px solid #ddd;
- padding: 0 10px;
- line-height: 40px;
- text-align: center;
- font-weight: bold;
- font-size: 12px;
- color: red;
- }
- #loading {
- display: none;
- position: absolute;
- top: 10px;
- right: 10px;
- }
- #calendar {
- max-width: 1100px;
- margin: 50px auto;
- }
- </style>
- </head>
- <body>
- <div id='script-warning'>
- This page should be running from a webserver, to allow fetching from the <code>json/</code> directory.
- </div>
- <div id='loading'>loading...</div>
- <div id='calendar'></div>
- </body>
- </html>
|