感谢您的陪伴。我只是在我的Dev Environemts上加载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.momentProperties
的moment
版本。如果您指出fullcalendar.js
而不是Min版本,则错误消息中的行号将帮助您查看错误是否源自同一问题。我通过从fullcalendar
下载ZIP文件并指向其中包含的moment.min.js
文件来修复它。我正在使用moment version 2.0.0
。fullcalendar
中包含的版本(今天下载)是2.18.1
。