angularangular-calendar

Angular calendar click event


I'm based on that thread.

I could add a method allowing to show a modal (popup) after clicking on an existing event as presented by that capture:

enter image description here

with that code:

 <mwl-calendar-week-view
    *ngSwitchCase="CalendarView.Week"
    [viewDate]="viewDate"
    [events]="events"
    [refresh]="refresh"
    (eventTimesChanged)="eventTimesChanged($event)"
    (eventClicked)="openModal($event.event)">

I'm stucked on how displaying a modal after clicking on an empty cell which doesn't have any event like explained by that capture:

enter image description here

Could you please give me some suggestions. Thanks a lot.


Solution

  • To resolve my problem, I refer to that thread https://angular-calendar.com/#/drag-to-create-events.

    In fact, once I clicked to an empty cell, a new event is created. And that what I'm asking for.

    I got that workaround from @SariaEssid reply.