Open SirAlfred0 opened 8 months ago
Describe the bug
hello @mattlewis92, I'm experiencing some issues with your package. as you can see in the below screenshot beforeViewRender event calls infinite times when I try to feed events to the calendar lazily here is my code
<mwl-calendar-month-view *ngSwitchCase="'month'" [viewDate]="viewDate" [events]="events" [activeDayIsOpen]="true" [refresh]="refresh" (eventTimesChanged)="eventTimesChanged($event)" (beforeViewRender)="onViewRender($event)" >
and the logic
onViewRender(viewRenderEvent: any): void { const start = new Date(viewRenderEvent.period.start).toISOString(); const end = new Date(viewRenderEvent.period.end).toISOString(); console.log(start, end); setTimeout(() => { this.events = e.filter(ev => ev.start.toISOString() >= start && ev.end?.toISOString()! <= end); }); }
just so you know this is just a demo in a real application I'm gonna fetch the events from the server via period.start and period.end.
@angular/core
angular-calendar
Thanks so much for opening an issue! If you'd like to support this project, then please consider sponsoring me
Describe the bug
hello @mattlewis92, I'm experiencing some issues with your package. as you can see in the below screenshot beforeViewRender event calls infinite times when I try to feed events to the calendar lazily here is my code
and the logic
just so you know this is just a demo in a real application I'm gonna fetch the events from the server via period.start and period.end.
@angular/core
: ^16.1.0angular-calendar
: ^0.31.0