A Pen by Sara Dolores Tasche ++ mitgedanken on CodePen.
Created
September 30, 2021 13:44
-
-
Save johnpoole/088d5ff62a5c90892d0317c469ac705e to your computer and use it in GitHub Desktop.
FullCalendar Example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div id='calendar'></div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
document.addEventListener('DOMContentLoaded', function() { | |
var calendarEl = document.getElementById('calendar'); | |
var calendar = new FullCalendar.Calendar(calendarEl, { | |
plugins: [ 'interaction', 'resourceTimeline' ], | |
timeZone: 'UTC', | |
defaultView: 'resourceTimelineDay', | |
aspectRatio: 2.5, | |
header: { | |
left: 'prev,next', | |
center: 'title', | |
right: 'resourceTimelineDay,resourceTimelineWeek,resourceTimelineMonth' | |
}, | |
editable: true, | |
resourceLabelText: 'Rooms', | |
resources: 'https://fullcalendar.io/demo-resources.json?with-nesting&with-colors', | |
events: 'https://fullcalendar.io/demo-events.json?single-day&for-resource-timeline' | |
}); | |
calendar.render(); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script src="https://fullcalendar.io/releases/core/4.0.1/main.min.js"></script> | |
<script src="https://fullcalendar.io/releases/interaction/4.0.1/main.min.js"></script> | |
<script src="https://fullcalendar.io/releases/timeline/4.0.1/main.min.js"></script> | |
<script src="https://fullcalendar.io/releases/resource-common/4.0.1/main.min.js"></script> | |
<script src="https://fullcalendar.io/releases/resource-timeline/4.0.1/main.min.js"></script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
html, body { | |
margin: 0; | |
padding: 0; | |
font-family: Arial, Helvetica Neue, Helvetica, sans-serif; | |
font-size: 14px; | |
} | |
#calendar { | |
max-width: 900px; | |
margin: 40px auto; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<link href="https://fullcalendar.io/releases/core/4.0.1/main.min.css" rel="stylesheet" /> | |
<link href="https://fullcalendar.io/releases/timeline/4.0.1/main.min.css" rel="stylesheet" /> | |
<link href="https://fullcalendar.io/releases/resource-timeline/4.0.1/main.min.css" rel="stylesheet" /> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment