Matan Arie
Matan Arie

Reputation: 51

Troubleshooting Basic Initialization

I'm completely new to FullCalendar and I'm trying to initialize with an existing Google Calendar. I have not done any customization. Using the code below (API and GCal ID have been altered for privacy and security) I can get an empty calendar to appear, but without any events from my Google Calendar. The Google Calendar is set to public. What am I doing wrong?

<!doctype html>
<head>
<meta charset="UTF-8">
<title>Veda's Calendar</title>
    <link rel='stylesheet' href='CSS/fullcalendar.css' />
    <script src="https://code.jquery.com/jquery-1.12.4.js"></script>
    <script src='JS/moment.js'></script>
    <script src='JS/gcal.js'></script>
    <script src='JS/fullcalendar.js'></script>

    <script type="text/javascript">
        $(function() {
            $('#calendar').fullCalendar({
                googleCalendarApiKey: 'AIwwSwCxxNGJyyyVYzzC7-zz70BEzzEzKzSzDM8',
                events: {
                    googleCalendarId: '[email protected]'
                }
              });
        });    
    </script>
</head>

    <body>
        <div id="calendar"></div>
    </body>
</html>

Upvotes: 2

Views: 311

Answers (1)

Shoyeb Sheikh
Shoyeb Sheikh

Reputation: 2866

Everything is fine except the script order,

<script src="https://code.jquery.com/jquery-1.12.4.js"></script>
<script src='JS/moment.js'></script>
<script src='JS/fullcalendar.js'></script>
<script src='JS/gcal.js'></script>

gcal.js should come after fullcalendar.js

Upvotes: 1

Related Questions