Fullcalendar: Unable to view, page is blank

I did everything on the Basic Usage page and added the CDN accordingly, but I can't even see the main display.
I tried the jsFiddle example too.
I am new to this.

<html>

    <head>
                 <link rel="stylesheet" href="http://cdnjs.cloudflare.com/ajax/libs/fullcalendar/2.3.1/fullcalendar.min.css">
                 <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>  
                 <script src=" https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.10.2/locales.min.js"></script>
                 <script src="http://cdnjs.cloudflare.com/ajax/libs/fullcalendar/2.3.1/fullcalendar.min.js"></script>

                  <link rel="stylesheet" href="         https://cdnjs.cloudflare.com/ajax/libs/fullcalendar/2.3.1/fullcalendar.print.css">                                                                      

    </head>

    <script>
        $(document).ready(function() {
        // page is now ready, initialize the calendar...

             $('#calendar').fullCalendar({
             // put your options and callbacks here
             })
        });   

    </script>

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

      

+3


source to share


1 answer


<html>

    <head>
                 <link rel="stylesheet" href="http://cdnjs.cloudflare.com/ajax/libs/fullcalendar/2.3.1/fullcalendar.min.css">
                 <link rel="stylesheet" href="         https://cdnjs.cloudflare.com/ajax/libs/fullcalendar/2.3.1/fullcalendar.print.css">       

                <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>  
                <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.10.2/moment.min.js"></script>  
                <script type="text/javascript" src="http://cdnjs.cloudflare.com/ajax/libs/fullcalendar/2.3.1/fullcalendar.min.js"></script>                                                                 
                <script type="text/javascript">
                    $(document).ready(function() {
                    // page is now ready, initialize the calendar...

                        $('#calendar').fullCalendar({
                            // put your options and callbacks here
                        });
                    });   

                </script>
    </head>



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

    </body>
</html>

      



1) Always put the script inside your body or head. 2) Your problem was that you never imported moment.js. Your code is getting locale.js which is not needed to run it. 3) Also please check your browser console. You would see the problem that moment.js could not find it. Hope this helps !!

+3


source







All Articles