Uncaught Typeerror: $(...). fullcallendar is not a Function

Asked

Viewed 137 times

0

I’ve tried everything to do fullcalendar work, my code is like this :

@{
    ViewBag.Title = "Calendario";
    //Layout = "~/Views/Shared/_Layout.cshtml";
}

<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<link href="http://cdnjs.cloudflare.com/ajax/libs/fullcalendar/3.1.0/fullcalendar.min.css" rel="stylesheet" />


<h2>Calendario</h2>
<div id='calendar' style="width:100%"></div>


<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.17.1/moment.min.js"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/fullcalendar/3.1.0/fullcalendar.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>

<script>
        $(document).ready(function () {
            $('#calendar').fullcallendar({
                header: {
                    left: 'prev,next,Hoje',
                    center: 'title',
                    right: 'month,agendaweek,agendaday'
                },
                defaultview: 'agendaday',
                editable: true,
                alldayslot: false,
                selectable: true,
                slotminutes: 15,
            });
        });
 </script>

Every time I run, I get the following message :

Uncaught Typeerror: $(...). fullcallendar is not a Function

Can anyone help me? I don’t know if I’m missing a file to map, or if I’m using some wrong library .

1 answer

0

There is a typo, you typed:

$('..').fullcallendar

The correct one is with a capital C and only one l in Calendar:

$('...').fullCalendar

Browser other questions tagged

You are not signed in. Login or sign up in order to post.