I use primeng p-fullcalendar in my angular app.
I get this error in command-line: 'Cannot find namespace 'FullCalendarVDom'
and in browser: 'Please import the top-level fullcalendar lib before attempting to import a plugin.'
my code:
import { FullCalendar } from 'primeng/fullcalendar';
import { Calendar } from '@fullcalendar/core';
import dayGridPlugin from '@fullcalendar/daygrid';
import timeGridPlugin from '@fullcalendar/timegrid';
import interactionPlugin from '@fullcalendar/interaction';
@ViewChild('calendar', { static: true }) private calendar: FullCalendar;
in c'tor:
this.events = [{
"title": "Conference",
"start": "2016-01-11",
"end": "2016-01-13"
}];
this.options = {
plugins: [dayGridPlugin, timeGridPlugin, interactionPlugin],
defaultDate: '2017-02-01',
header: {
left: 'prev,next',
center: 'title',
right: 'month,agendaWeek,agendaDay'
}
I added these imports according to preview answers, but it did not help.
What I missed?
Primeng working with FullCalendar 4.1, instead of instaling latest version of FullCalendar try to install v4.1.
npm i @fullcalendar/[email protected]
npm i @fullcalendar/[email protected]
npm i @fullcalendar/[email protected]
npm i @fullcalendar/[email protected]
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With