在更改视图网格fullcalendar v4上拖放后,具有rrule插件的事件未更新

时间:2019-12-16 14:43:11

标签: javascript fullcalendar fullcalendar-4 rrule

我目前正在使用带有rrule插件的Fullcalendar v4

我有这个代码

var calendarEl = document.getElementById('calendardemo');
var calendar = new FullCalendar.Calendar(calendarEl, {
plugins: ['interaction', 'dayGrid', 'timeGrid', 'momentTimezone', 'rrule', 'list'],
header: {
     left: 'prev,next today',
     center: 'title',
     right: 'dayGridMonth,timeGridWeek,timeGridDay'
},
editable: true,
events: [
{ // standard property
     title: 'This is sample event',
     start: '2019-12-29', 
     end: '2019-12-31'
},
{
     title: 'event with rrule plugin',
     rrule: {
          freq: 'weekly',
          interval: 5,
          byweekday: [ 'mo', 'fr' ],
          dtstart: '2019-12-29T10:30:00',
          until: '2020-12-31'
     }
}
]
});
calendar.render();

请注意:

{ // this is the standard (No issues)
     title: 'This is sample event',
     start: '2019-12-29', 
     end: '2019-12-31'
}
{ // Not updating on change view
     title: 'event with rrule plugin',
     rrule: {
          freq: 'weekly',
          interval: 5,
          byweekday: [ 'mo', 'fr' ],
          dtstart: '2019-12-29T10:30:00',
          until: '2020-12-31'
     }
}

Link to a demo

现在,当我拖放“这是示例事件” ,然后更改视图网格或单击<>时,它将保持更新。但是当我拖放“带有rrule插件的事件” 时,然后更改视图网格或单击<>,它不会更新。它只是停留在第一次加载的位置。请帮忙。谢谢!

1 个答案:

答案 0 :(得分:0)

您可能必须添加一个表单,该表单允许用户在开始拖动重复的规则时更改它们。否则,您能否描述用户在另一个日期删除重复事件后的预期行为。将对规则进行哪些更改?