尝试将 FullCalendar v3.9.0 与 SailsJS 结合使用。使用 jQuery v3.2.1。 MomentJS 和 jQuery 在 fullcalendar 之前加载。这是我当前的 FullCalendar 代码。
$('#calendar').fullCalendar({
header: {
left: 'today prev,next',
center: 'title',
right: 'agendaWeek,agendaDay'
},
views: {
week: {
titleFormat: 'DD.MM.YYYY'
}
},
defaultView: 'agendaWeek',
locale: 'fi',
weekends: true,
events: [
{
title: 'Event 1',
start: '2018-06-25T15:00+03:00'
},
{
title: 'Event 2',
start: '2018-06-26T12:00+03:00'
}
],
editable: true,
selectable: true,
});
每行的日期时间丢失。标题两侧的按钮也丢失了。
最佳答案
从屏幕截图来看,您似乎使用的是 FullCalendar 提供的打印 CSS,而不是浏览器 CSS。
如果您已包含这两个文件,请确保在 print.css 文件上正确设置媒体查询,以便仅在打印页面时使用它。例如:
<link href='fullcalendar.min.css' rel='stylesheet' />
<link href='fullcalendar.print.min.css' rel='stylesheet' media='print' />
确保“print”文件中存在 media='print'
,如上面的示例所示。
参见https://developer.mozilla.org/en-US/docs/Web/HTML/Element/link对于语法,和 https://developer.mozilla.org/en-US/docs/Web/CSS/Media_Queries/Using_media_queries有关一般媒体查询的信息。
关于javascript - FullCalendar 不显示日期时间,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51057296/