0

I'm using FullCalendar 5.5.1 The problem is that it doesn't display correctly and I keep receiving This Error: TypeError: $(...).fullCalendar is not a function

Here is my code:

$(document).ready(function () { InitializeCalendar(); }); function InitializeCalendar() { try { $('#calendar').fullCalendar({ timezone: false, header: { left: 'prev,next,today', center: 'title', right: 'month,agendaWeek,agendaDay' }, selectable: true, editable: false }); } catch (e) { alert(e); } } 

Here are references:

<script type="text/javascript" src="~/lib/select2/js/select2.full.min.js"></script> <script type="text/javascript" src="//cdn.jsdelivr.net/momentjs/latest/moment.min.js"></script> <script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/qtip2/3.0.3/jquery.qtip.min.js"></script> <script type="text/javascript" src="https://cdn.jsdelivr.net/combine/npm/[email protected]"></script> <script src="https://kendo.cdn.telerik.com/2020.2.513/js/kendo.all.min.js"></script> <script type="text/javascript" src="~/js/notify.min.js"></script> <script src="~/js/script-custom-calendar.js"></script> 

I'm following a tutorial and this worked for him. I don't know why is doesn't work for me. This is the original project: https://github.com/bhrugen/appointmentscheduler

1 Answer 1

4

Since version 4 of FullCalendar, this is not the way to initialize the calendar. See the changes here: https://fullcalendar.io/docs/v4/upgrading-from-v3

Major breaking changes:

Removal of jQuery as a dependency. Consequently: Raw DOM nodes are used in place of jQuery objects Calendar initialization no longer happens via a jQuery method.

See how to do it the v5 way here: https://fullcalendar.io/docs/initialize-globals

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.