I'm trying to render reccurring events in Angular using fullcalendar 4.0.0-alpha2 and RRULE.
angular.json:
"scripts": [
"node_modules/fullcalendar/dist/fullcalendar.js",
"node_modules/rrule/dist/es5/rrule.js",
"node_modules/fullcalendar/dist/plugins/rrule.min.js"
]
mycomponent.component.ts:
import { Calendar } from 'fullcalendar';
import { RRule } from "rrule";
ngOnInit(): void {
const rule = new RRule({
freq: RRule.DAILY,
interval: 1,
byweekday: [RRule.MO, RRule.FR],
dtstart: new Date(Date.UTC(2018, 1, 1, 10, 30)),
until: new Date(Date.UTC(2020, 12, 31))
});
var calendarEl = document.getElementById('calendarDirectTest');
var calendar = new Calendar(calendarEl, {
events: [
{
"title": "Test A",
"start": "2018-10-09T16:00:00",
rrule: rule
}
]
});
calendar.render();
}
The event renders but just once, meaning fullcalendar completely ignores the RRULE property, despite me including the rrule library AND the rrule plugin.
This is the documentation regarding that plugin: https://fullcalendar.io/docs/v4/rrule-plugin
The only thing that I see that's different is the way they import the connector / plugin, which is:
import 'fullcalendar/plugins/rrule';
But that doesn't work on Angular, unless I'm missing something.
Thank you