gpt4 book ai didi

javascript - FullCalendar 正在加载 > 未捕获的类型错误 : Cannot read property 'push' of undefined

转载 作者:可可西里 更新时间:2023-11-01 12:59:22 24 4
gpt4 key购买 nike

首先感谢您的帮助。我只是在我的开发环境中加载 FullCalendar ( https://fullcalendar.io/),但它似乎不起作用。

当我在 Chrome 上打开控制台时,出现以下问题。

Uncaught TypeError: Cannot read property 'push' of undefined
at fullcalendar.min.js:6
at fullcalendar.min.js:6
at fullcalendar.min.js:6

我什至还没有调用/声明脚本,这让我很困惑。

代码简化为下面的基本内容。谢谢

<!DOCTYPE html>
<html lang="en">

<head>
<title>Home</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">

<!-- CSS -->
<link href="http://localhost/dev/assets/third-party/css/styles.css" rel="stylesheet">
<link href="http://localhost/dev/assets/third-party/css/skins/indianred.css" rel="stylesheet">
<link href='//cdnjs.cloudflare.com/ajax/libs/fullcalendar/3.2.0/fullcalendar.min.css' rel='stylesheet' />
<link href='//cdnjs.cloudflare.com/ajax/libs/fullcalendar/3.2.0/fullcalendar.print.css' rel='stylesheet' media='print' />

</head>
<body>
<!-- WRAPPER -->
<div class="wrapper">
<div id="calendar"></div>

</div>
<!-- END WRAPPER -->
<!-- JAVASCRIPTS -->
<script src='http://localhost/dev/assets/third-party/js/jquery-2.1.1.min.js'></script>
<script src='http://localhost/dev/assets/third-party/js/bootstrap.min.js'></script>
<script src='http://localhost/dev/assets/third-party/js/repute-scripts.js'></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/1000hz-bootstrap-validator/0.11.9/validator.min.js"></script>
<script src='http://localhost/dev/assets/third-party/js/plugins/moment/moment.min.js'></script>
<script src='http://localhost/dev/assets/third-party/js/plugins/fullcalendar/fullcalendar.min.js'></script>
<script src="http://localhost/dev/assets/js/b/result.js"></script>
<script src="http://localhost/dev/assets/js/b/event.js"></script>
<script src="http://localhost/dev/assets/js/b/bapp.js"></script>
<script>
$(function() {
var bapp = new Bapp();
});
</script>
<!-- END JAVASCRIPTS -->
</body>
</html>

最佳答案

我有同样的错误消息,因为我使用的 moment 版本不支持 moment.momentProperties。如果您指向 fullcalendar.js 而不是最小版本,则错误消息中的行号将帮助您了解错误是否源自同一问题。我通过从 fullcalendar 下载 zip 文件并指向其中包含的 moment.min.js 文件来修复它。我使用的是 moment 版本 2.0.0fullcalendar(今天下载)中包含的版本是 2.18.1

关于javascript - FullCalendar 正在加载 > 未捕获的类型错误 : Cannot read property 'push' of undefined,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42632110/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com