FullCalendar.io。无法呈现背景事件

时间:2018-05-25 06:18:34

标签: javascript function ionic-framework fullcalendar

我正在效仿这个答案的例子:

How can I create an event based on pattern for calendar?

有一个问题。当我尝试在后台模式下添加渲染事件(添加渲染:'background')时,事件不会显示。但是,当我删除它时,事件显示为。

这是我的代码:

          events.push({
            title: schedule[s].title,
            color: schedule[s].color,
            // we have to clone because the add() call below mutates the date
            start: day.clone(),
            allday: true,
            rendering: 'background'<--putting this line causes error in events rendering. removing it(as per the tutorial) is okay.
          });

我该如何制作

1 个答案:

答案 0 :(得分:1)

那是因为allday参数为真。根据文件:

  

定时的背景事件只会在时间上呈现   议程视图中的插槽。 全天的背景事件仅为   以月视图或议程视图的全天时段呈现。

来源:Background-events