javascript 缺少 FullCalendar 标题按钮

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/25681573/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-28 04:49:50  来源:igfitidea点击:

FullCalendar header buttons missing

javascriptjqueryfullcalendar

提问by Moji

I am using fullCalendaras below and have defined header section, everything works ok except header where it's only showing title but next, prev, month view etc buttons are missing

我正在使用fullCalendar如下并定义了标题部分,一切正常,除了标题,它只显示标题但下一个,上一个,月视图等按钮丢失

if I remove word 'title' it removes title so it seems to be doing something but just not showing buttons, any ideas why? am I missing something? my code looks like below:

如果我删除“标题”这个词,它会删除标题,所以它似乎在做一些事情,但只是不显示按钮,有什么想法吗?我错过了什么吗?我的代码如下所示:

jQuery('#calendar').fullCalendar({
    header: {
        left: 'prev,next today',
        center: 'title',
        right: 'month,agendaWeek,agendaDay'
    },
    eventSources:
    [{
        url: url,
        color: '#ffdce5',
        textColor: 'black' 
    }]

})

回答by SteveB

Having just had the same problem I suspect your issue is that you're missing the media="print"attribute on the fullcalendar.print.cssstyle sheet link.

刚刚遇到同样的问题,我怀疑您的问题是您缺少样式表链接media="print"上的属性fullcalendar.print.css

回答by ssin

And if you're using Zend Framework to append the stylesheet, you can use this to add the media="print"...

如果您使用 Zend Framework 附加样式表,您可以使用它来添加 media="print"...

$this->view->headLink()->appendStylesheet('/styles/jquery-plugins/fullcalendar.print.css', 'print');