FullCalendar v5 - TypeError: $(...).fullCalendar is not a function
FullCalendar v5 - TypeError: $(...).fullCalendar is not a function
我正在使用 FullCalendar 5.5.1
问题是它显示不正确,我不断收到此错误:
类型错误:$(...).fullCalendar 不是函数
这是我的代码:
$(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);
}
}
参考资料如下:
<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/fullcalendar@5.5.1"></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>
我正在学习教程,这对他有用。我不知道为什么它对我不起作用。这是原始项目:
https://github.com/bhrugen/appointmentscheduler
从 FullCalendar 的第 4 版开始,这不是初始化日历的方式。在此处查看更改: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.
在此处查看如何以 v5 方式执行此操作:https://fullcalendar.io/docs/initialize-globals
我正在使用 FullCalendar 5.5.1 问题是它显示不正确,我不断收到此错误: 类型错误:$(...).fullCalendar 不是函数
这是我的代码:
$(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);
}
}
参考资料如下:
<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/fullcalendar@5.5.1"></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>
我正在学习教程,这对他有用。我不知道为什么它对我不起作用。这是原始项目: https://github.com/bhrugen/appointmentscheduler
从 FullCalendar 的第 4 版开始,这不是初始化日历的方式。在此处查看更改: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.
在此处查看如何以 v5 方式执行此操作:https://fullcalendar.io/docs/initialize-globals