我正在使用fullcalendar v 3.6 in angular5。
我正在获取rrule,如此图像所示
我的代码是
showEvents(events: any) {debugger
let calendarOptions: Object;
let newEvents = [];
this.eventSource.map((event) => {
event.title = event.name;
event.start = event.startTime;
event.end = event.endTime;
event.status = event.eventStatus;
event.allDay = event.isallDay;
event.rrule = event.recurrencePattern;
newEvents.push(event);
});
newEvents.forEach(element => {
if(element.recurrencePattern === "RRULE:FREQ=MONTHLY;")
{
element.dom = [1];
newEvents.push(element);
}
});
calendarOptions = {
header:
{
left: 'prev,next, today',
center: 'title',
right: 'month,agendaWeek,agendaDay,listMonth'
},
events : newEvents
};
如何在Angular 5中的FullCalendar v3.6上添加重复的事件?请帮助
您可以使用rrule库启动rrule对象。然后,您调用rrule的对象between
函数,其中插入当前FullCalendar视图的开始和结束日期。这为您提供了一系列事件,您可以添加到日历中。