mattlewis92 / angular-calendar

A flexible calendar component for angular 15.0+ that can display events on a month, week or day view.
https://mattlewis92.github.io/angular-calendar/
MIT License
2.72k stars 863 forks source link

Cannot read properties of undefined (reading 'rowOffsets') #1743

Open xmrhahnx opened 1 week ago

xmrhahnx commented 1 week ago

Describe the bug

Hi there, I'm just trying to get started with the angular-calendar but it doesn't show anything and in console I see the error:

Cannot read properties of undefined (reading 'rowOffsets')

Minimal reproduction of the problem with instructions

There it is my app.modules.ts:

imports: [ ... CalendarModule.forRoot({ provide: DateAdapter, useFactory: adapterFactory }), ],

and in the app.component.html I just added

<mwl-calendar-month-view></mwl-calendar-month-view>

Versions

matts-bot[bot] commented 1 week ago

Thanks so much for opening an issue! If you'd like to support this project, then please consider sponsoring me

honzaulrych commented 1 week ago

The CalendarMonthViewComponent has required attributes viewDate and events (docs). You can try simple new Date() for viewDate and empty array [] for events.