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 865 forks source link

Angular 14.0+ calendar- $event.item is missing in the contextMenuItem #1618

Open dsanthosh2022 opened 1 year ago

dsanthosh2022 commented 1 year ago

Describe the bug

We are using the angular-calender (angular-calendar": "^0.28.24) in Angular -10 for scheduling functionality.

We have a context menu, when I click the option in the Add Schedule option will display as shown below

image

Code: <ng-template *ngIf="name=='schedule'" contextMenuItem (execute)="addEvent($event,$event.item)"> Add Schedule </ng-template>

Here, $event.item will give the cell information of where I did right-click and click the Add Schedule

{
    "date": "2022-10-31T05:30:00.000Z",
    "displayDate": "2022-10-31T05:30:00.000Z",
    "isStart": true,
    "id": 1,
    "personcompanyid": "D063521359",
    "name": "WILLIAM FITZSIMMONS",
    "bkcolor": "#b7fd67"
}

Everything is working fine in Angular 10 as expected. Now, we are upgrading the entire project to angular 14. Here, we are using angular-calendar": "^0.30.1. Here , $event.item returns undefined. Can you please help me on this one?

Minimal reproduction of the problem with instructions

https://mattlewis92.github.io/angular-calendar/#/context-menu

Screenshots

From https://mattlewis92.github.io/angular-calendar/#/context-menu, the $event.item is missing.

image

Versions

matts-bot[bot] commented 1 year ago

Thanks so much for opening an issue! If you'd like me to give priority to answering your issue or would just like to support this project, then please consider sponsoring me

fsegurai commented 1 year ago

I'm having some issues with the context menu item, using the sample code: image

It returns undefined and I cannot get the value (I'm using Angular V.15)