如何防止fullcalendar显示事件标题中的开始时间?

use*_*617 9 fullcalendar

在月视图中,fullcalendar具有很好的功能,可以显示非allDay事件顶行的开始时间.如果您不想在事件标题中提供更多详细信息,这可能很有用.

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

这导致fullcalendar显示我的事件:"15 15.00 - 18.00".

有没有办法阻止fullcalendar显示开始时间或有没有办法让fullcalendar显示完整的时间跨度(15.00 - 18.00)?

谢谢.亚历克斯

Ray*_*ond 12

试试这个,它对我有用:

$('#calendar').fullCalendar({
     displayEventTime : false
});
Run Code Online (Sandbox Code Playgroud)

这应该会阻止fullcalendar显示事件标题中的开始时间.


Jua*_*les 10

这就是你要找的......

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

timeFormat: 'H(:mm)' // uppercase H for 24-hour clock
Run Code Online (Sandbox Code Playgroud)

我相信,如果你想删除它你只需要包括一个空字符串...

timeFormat: ''(, or no , depending on if there is another object following)
Run Code Online (Sandbox Code Playgroud)

  • 我正在使用版本2.3.1并发现上述解决方案不起作用,但提供单个空格确实:`''`. (3认同)