我正在尝试设置一个完整日历来显示公共(public) 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: '<a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="d2b3b0b192b5a0bda7a2fcb1b3beb7bcb6b3a0fcb5bdbdb5beb7fcb1bdbf" rel="noreferrer noopener nofollow">[email protected]</a>'
}
});
});
</script>
<title>
test calendar</title>
</head>
<body>
<center>
<div id='calendar'></div>
</center>
</body>
</html>
最佳答案
如果您想使用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
)
关于fullcalendar - 完整日历导航链接未显示,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44020204/