我正在尝试设置一个完整日历,以显示来自公共Google日历的事件。我已经设置了一个测试日历,它正在显示事件。但是,导航链接根本没有显示?
这是我的代码:
<html>
<head>
<link rel="stylesheet" type="text/css" href="https://fullcalendar.io/js/fullcalendar-3.4.0/fullcalendar.min.css">
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/fullcalendar/3.4.0/fullcalendar.print.css">
<script src="https://fullcalendar.io/js/fullcalendar-3.4.0/lib/moment.min.js"></script>
<script src="https://fullcalendar.io/js/fullcalendar-3.4.0/lib/jquery.min.js"></script>
<script src='https://cdnjs.cloudflare.com/ajax/libs/fullcalendar/3.4.0/fullcalendar.min.js'></script>
<script src='https://cdnjs.cloudflare.com/ajax/libs/fullcalendar/3.4.0/locale/fi.js'></script>
<script src='https://cdnjs.cloudflare.com/ajax/libs/fullcalendar/3.4.0/gcal.js'></script>
<script>
$(document).ready(function() {
$('#calendar').fullCalendar({
header: {
left: 'prev,next,today',
center: 'title',
right: 'month,agendaWeek,agendaDay,listWeek'
},
weekNumbers: true,
navLinks: true,
googleCalendarApiKey: 'working api key here',
events: {
googleCalendarId: 'abc@group.calendar.google.com'
}
});
});
</script>
<title>
test calendar</title>
</head>
<body>
<center>
<div id='calendar'></div>
</center>
</body>
</html>
答案 0 :(得分:2)
您遇到的问题很简单,只需添加 media =&#39; print&#39; tp打印样式表
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/fullcalendar/3.4.0/fullcalendar.print.css" >
到
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/fullcalendar/3.4.0/fullcalendar.print.css" media='print'>
答案 1 :(得分:2)
如果您想使用fullcalendar.print.css
,则必须在样式表中添加media="print"
,例如
<link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/fullcalendar/3.4.0/fullcalendar.print.css" media="print">
另一个选项是您也可以从页面中删除此fullcalendar.print.css
样式表(但如果您想在打印屏幕上查看日历,请不要删除fullcalendar.print.css
)< / p>