-1

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.

Liliya
  • 37
  • 7

2 Answers2

0

What html element has the empty cell?

You can do (click) on any html element, e.g.

<div (click)="onClickEmptyCell()"><!-- empty cell --></div>
  • 1
    Hello Sir @ThorstenRintelen, thanks a lot for your reply. I'd like to do modification on ` the `(eventClicked)` is only works with cell with exiting event (like presented with picture 1). That cannot be done with empty cell (cell with no event : like presented with picture 2). Have you please any idea to do that ?. Thanks again Sir. – Liliya Aug 11 '20 at 11:31
0

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.

Saria Essid
  • 1,240
  • 1
  • 11
  • 16
Liliya
  • 37
  • 7