Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

angular9 with primeng fullcalendar throws errors: Cannot find namespace 'FullCalendarVDom'. and 'Please import the top-level fullcalendar lib'

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?

like image 575
lea fishman Avatar asked Oct 27 '25 07:10

lea fishman


1 Answers

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]
like image 93
ierhalim Avatar answered Oct 28 '25 21:10

ierhalim



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!