Search code examples
javascriptjqueryangularjsfullcalendarfullcalendar-scheduler

how to view full calendar using index file?


Following is the code that I am used to display full calendar view. But it is not working.

<html>
<head>
    <link href="fullcalendar.css" rel="stylesheet" />
    <link href="scheduler.css" rel="stylesheet" />
    <script src="moment.js"></script>
    <script src="jquery.js"></script>
    <script src="fullcalendar.js"></script>
    <script src="scheduler.js"></script>
</head>
<body>
    <div id="calendar"></div>
</body>
</html>

Solution

  • You have to init fullcalendar in a script tag on the end of the body using

    <script>
    $(document).ready(function() {
        // page is now ready, initialize the calendar...
    
        $('#calendar').fullCalendar({
            // put your options and callbacks here
        })
    
    });
    </script>
    

    Also, are you sure the script and stylesheet files are on the same directory of your page?

    You can find documentation on FullCalendar Docs