Created
November 29, 2020 14:44
-
-
Save znatz/3a709b48b4a16fa6c7b937a17653e5ea to your computer and use it in GitHub Desktop.
FullCalendar
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, { | |
selectable: true, | |
headerToolbar: { | |
left: 'prev,next today', | |
center: 'title', | |
right: 'dayGridMonth,timeGridWeek,timeGridDay' | |
}, | |
dateClick: function(info) { | |
alert('clicked ' + info.dateStr); | |
}, | |
select: function(info) { | |
alert('selected ' + info.startStr + ' to ' + info.endStr); | |
} | |
}); | |
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://cdn.jsdelivr.net/npm/[email protected]/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: 1100px; | |
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://cdn.jsdelivr.net/npm/[email protected]/main.min.css" rel="stylesheet" /> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment