Created
May 16, 2017 01:02
-
-
Save Beasta/18546cd73d7d4bb0e702562d5439f701 to your computer and use it in GitHub Desktop.
Basic Google Calendar integration for 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
<link href="//cdnjs.cloudflare.com/ajax/libs/fullcalendar/3.4.0/fullcalendar.min.css" rel="stylesheet"> | |
<link href="//cdnjs.cloudflare.com/ajax/libs/fullcalendar/3.4.0/fullcalendar.print.css" rel="stylesheet" media="print"> | |
<script src="https://momentjs.com/downloads/moment.min.js"></script> | |
<script src="https://code.jquery.com/jquery-3.2.1.min.js"></script> | |
<script type='text/javascript' src='//cdnjs.cloudflare.com/ajax/libs/fullcalendar/3.4.0/fullcalendar.min.js'></script> | |
<script type='text/javascript' src='//cdnjs.cloudflare.com/ajax/libs/fullcalendar/3.4.0/gcal.min.js'></script> | |
<script type='text/javascript'> | |
// posting this because the following is a poor example https://fullcalendar.io/docs/google_calendar/ | |
// This was used to wrap google calendar in squarespace and make it look tremendously better | |
$(document).ready(function() { | |
$('#calendar').fullCalendar({ | |
googleCalendarApiKey: 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxx', | |
events: { | |
googleCalendarId: '[email protected]' | |
} | |
}); | |
}); | |
</script> | |
<style> | |
body { | |
margin: 40px 10px; | |
padding: 0; | |
font-family: "Lucida Grande",Helvetica,Arial,Verdana,sans-serif; | |
font-size: 14px; | |
} | |
#loading { | |
display: none; | |
position: absolute; | |
top: 10px; | |
right: 10px; | |
} | |
#calendar { | |
max-width: 900px; | |
margin: 0 auto; | |
} | |
</style> | |
<div id='loading'>loading...</div> | |
<div id='calendar'></div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment