如何阻止fullcalendar在事件标题中显示开始时间



在monthwiew fullcalendar中有一个很好的功能,可以在非allDay事件的顶部显示开始时间。如果您不想在事件标题中提供更多详细信息,这可能会很有用。

我想在月视图中显示几个细节,如开始和结束时间(15.00-18-00)、位置等。

这导致了完整日历显示我的活动如下:"15 15.00-18.00"。

有没有什么方法可以阻止完整日历显示开始时间,或者有没有什么办法可以让完整日历显示完整的时间跨度(15.00-18.00)?

谢谢。Alex

试试这个,它对我有用:

$('#calendar').fullCalendar({
     displayEventTime : false
});

这将阻止fullcalendar在事件标题中显示开始时间。

这就是您想要的。。。

http://arshaw.com/fullcalendar/docs/text/timeFormat/

timeFormat: 'H(:mm)' // uppercase H for 24-hour clock

我相信,如果你想删除它,你所要做的就是包括一个空字符串,也就是。。。

timeFormat: ''(, or no , depending on if there is another object following)

正如@Isaak Kleinman在评论中所说,这是正确的语法:

timeFormat: ' ',       //with the space

我遇到了同样的问题。。。我通过得到了解决方案

将此添加到您的代码中:

displayEventEnd: true,
timeFormat: 'h:mma',

最新更新