[英]fullcalendar.js from CDNJS not working?
I had another question about this but the text was cumbersome. 我对此有另一个疑问,但案文繁琐。 I deleted the other question in favor of this...
我删除了另一个支持此问题的问题...
I recently found fullcalendar.js. 我最近找到了fullcalendar.js。 I was initially able to see the calendar widget and the css styling, title, nav buttons, etc. But that has since stopped.
最初,我可以看到日历小部件以及CSS样式,标题,导航按钮等。但是此后就停止了。 I can see the widget and usually the title but not the styling or buttons.
我可以看到小部件,通常可以看到标题,但不能看到样式或按钮。
I have a fiddle https://jsfiddle.net/a3q9c5tr/ that demonstrates this. 我有一个小提琴https://jsfiddle.net/a3q9c5tr/证明了这一点。 It is using the fullcalendar libs from CDNJS.
它使用CDNJS中的fullcalendar库。 It is getting the jquery and moment.js libs from CDNJS.
它正在从CDNJS获取jquery和moment.js库。 The fullcalendar "Support" section suggests using JSBIN... I have the same result there as with jsfiddle.
全日历的“支持”部分建议使用JSBIN ...我在那里得到的结果与jsfiddle相同。
I have also tried downloading the fullcalendar library and using the included jquery and moment libs as well as using other local and CDN jquery and moment libs. 我还尝试下载fullcalendar库,并使用包含的jquery和moment库以及使用其他本地和CDN jquery和moment库。 It is as though fullcalendar can not find its own css.
好像fullcalendar找不到自己的CSS。
I have run developer tools on the fiddle and on my local tests. 我已经在小提琴和本地测试中运行了开发人员工具。 Everything looks like it is loading.
一切看起来都正在加载。
I must be doing something trivial but I can not see it. 我必须做些琐碎的事,但看不到。 ideas?
想法?
The libs used in the fiddle are: 小提琴中使用的库是:
<link rel="stylesheet" type="text/css" href="//cdnjs.cloudflare.com/ajax/libs/fullcalendar/2.6.1/fullcalendar.min.css">
<link rel="stylesheet" type="text/css" href="//cdnjs.cloudflare.com/ajax/libs/fullcalendar/2.6.1/fullcalendar.print.css">
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/jquery/2.2.1/jquery.min.js"></script>
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/moment.js/2.12.0/moment.min.js"></script>
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/fullcalendar/2.6.1/fullcalendar.min.js"></script>
The html body is just html主体就是
<div id='calendar'></div>
The javascript section is: javascript部分是:
$(document).ready(function() {
$('#calendar').fullCalendar({
left: 'prev,next today',
center: 'title',
right: 'month,agendaWeek,agendaDay'
});
});
UPDATE: 更新:
I fixed the fiddle and it is using the newest release of fullcalendar: https://jsfiddle.net/y3llowjack3t/a3q9c5tr/4/ 我修复了小提琴,它正在使用fullcalendar的最新版本: https ://jsfiddle.net/y3llowjack3t/a3q9c5tr/4/
Just remove the fullcalendar.print.css 只需删除fullcalendar.print.css
$(document).ready(function() {
$('#calendar1').fullCalendar({
header: {
left: 'prev,next,today',
center: 'title',
right: 'month,agendaWeek,agendaDay'
}
});
});
And to see the calendar with a theme do 并查看带有主题的日历
theme: true,
https://jsfiddle.net/y3llowjack3t/a3q9c5tr/5/ https://jsfiddle.net/y3llowjack3t/a3q9c5tr/5/
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.