---
title: "Angular Event calendar Event Popover Example | Mobiscroll"
component: "Event calendar"
framework: "Angular"
library_version: "6.2.0"
url: "https://demo.mobiscroll.com/angular/eventcalendar/event-popover"
---

# Event Popover - Angular Event calendar demo

Keep the month grid clean in an Angular event calendar — day cells show a dot or event count, and clicking opens a popover listing that day's events.

- [Live demo](https://demo.mobiscroll.com/angular/eventcalendar/event-popover)
- [View code on GitHub](https://github.com/acidb/mobiscroll-demos-angular/tree/main/src/demos/eventcalendar/calendar-view/event-popover)
- This demo in other frameworks: [JavaScript](https://demo.mobiscroll.com/eventcalendar/event-popover.md), [jQuery](https://demo.mobiscroll.com/jquery/eventcalendar/event-popover.md), [React](https://demo.mobiscroll.com/react/eventcalendar/event-popover.md), [Vue](https://demo.mobiscroll.com/vue/eventcalendar/event-popover.md)

## Description

Besides displaying events as labels, you can have them show up in a pop-over. Set it up through the `calendar: {popover: true}` object inside the [`view`](https://mobiscroll.com/docs/angular/eventcalendar/api#opt-view) option. Using the popover setting saves vertical space and provides a subtle cue to the user that there are events. A small dot will appear in day cells with events or if `calendar: {count: true}` is set, an event count is displayed.

The same popover is rendered when events are displayed as labels and not all fit vertically in the calendar day cells.

**Interested in customizing how the events look?** [Take a look at how you can do it →](https://demo.mobiscroll.com/angular/eventcalendar/customize-event-popover)

## What this demo shows

- A full month event calendar that keeps the month grid clean by showing daily summary indicators and opening a popover with the events for the selected day.
- **Day cells** Days that have events display a light blue horizontal summary label with `X event` or `X events` text, where `X` represents the number of events, inside the day cell instead of listing every event directly in the month grid.
- **Popover trigger** Clicking or hovering over the summary label highlights it; clicking the label opens a popover above the day cell while the rest of the calendar remains visible in the background.
- **Event list** The popover lists the events for the selected day, and each event has a small colored vertical marker on the left to help distinguish categories.
- **Hover state** Hovering over a day cell highlights the day number in the top-right corner with a gray background.
- **Selection** Clicking an empty part of a day cell selects the day and highlights the day number in blue.
- **Navigation** Users can move between months with the previous and next arrow buttons, the `Today` button in the header, or by clicking and dragging the calendar left or right.

## Best for

- **Booking systems** Reservation and appointment scenarios where each day may contain multiple entries that are easier to inspect in a popover.
- **Event-heavy calendars** Schedules with many events where showing every label directly in the grid would make the month view hard to scan.

## API used in this demo

- [`theme`](https://mobiscroll.com/docs/angular/eventcalendar/api#opt-theme) - option
- [`themeVariant`](https://mobiscroll.com/docs/angular/eventcalendar/api#opt-themeVariant) - option
- [`clickToCreate`](https://mobiscroll.com/docs/angular/eventcalendar/api#opt-clickToCreate) - option
- [`dragToCreate`](https://mobiscroll.com/docs/angular/eventcalendar/api#opt-dragToCreate) - option
- [`dragToMove`](https://mobiscroll.com/docs/angular/eventcalendar/api#opt-dragToMove) - option
- [`dragToResize`](https://mobiscroll.com/docs/angular/eventcalendar/api#opt-dragToResize) - option
- [`eventDelete`](https://mobiscroll.com/docs/angular/eventcalendar/api#opt-eventDelete) - option
- [`view`](https://mobiscroll.com/docs/angular/eventcalendar/api#opt-view) - option
- [`onEventClick`](https://mobiscroll.com/docs/angular/eventcalendar/api#event-onEventClick) - event
- [`data`](https://mobiscroll.com/docs/angular/eventcalendar/api#opt-data) - option

## Code

### Component

```ts
import { CommonModule } from '@angular/common';
import { HttpClient } from '@angular/common/http';
import { Component, OnInit } from '@angular/core';
import { MbscCalendarEvent, MbscEventcalendarOptions, MbscModule, Notifications } from '@mobiscroll/angular';

@Component({
  selector: 'app-root', 
  templateUrl: './app.component.html',
  providers: [Notifications],
  standalone: true,
  imports: [CommonModule, MbscModule],
})
export class AppComponent implements OnInit {
  constructor(
    private http: HttpClient,
    private notify: Notifications,
  ) {}

  myEvents: MbscCalendarEvent[] = [];

  eventSettings: MbscEventcalendarOptions = {
    theme: 'ios',
    themeVariant: 'light',
    clickToCreate: true,
    dragToCreate: true,
    dragToMove: true,
    dragToResize: true,
    eventDelete: true,
    view: {
      calendar: {
        popover: true,
        count: true,
      },
    },
    onEventClick: (args) => {
      this.notify.toast({
        message: args.event.title,
      });
    },
  };

  ngOnInit(): void {
    this.http.jsonp<MbscCalendarEvent[]>('https://trial.mobiscroll.com/events/?vers=5', 'callback').subscribe((resp) => {
      this.myEvents = resp;
    });
  }
}
```

### Template

```html
<mbsc-eventcalendar [data]="myEvents" [options]="eventSettings"></mbsc-eventcalendar>
```

## Implementation notes

- Set `view: { calendar: { popover: true, count: true } }` to show a count indicator in each day cell that has events, and open a popover listing all events for that day when the indicator is clicked.
- Load events from a remote endpoint using `getJson` and assign them to `data`; for the imperative API, call `inst.setEvents(events)` in the callback.
- Handle `onEventClick` to show a `Toast` with `args.event.title`.

## Run it in your project

1. If not signed up yet, or don't own a license, you can [start a free trial](https://mobiscroll.com/starttrial).

2. Clone the repository:

   ```
   git clone https://github.com/acidb/mobiscroll-demos-angular.git
   ```

3. If not installed yet, install the Mobiscroll CLI from NPM:

   ```
   npm install -g @mobiscroll/cli
   ```

4. Config Mobiscroll - open a terminal window in the root directory and run:

   ```
   mobiscroll config angular
   ```

5. Install dependencies - open a terminal window in the root directory and run:

   ```
   npm install
   ```

6. Run the project:

   ```
   ng serve
   ```

On a trial, add `--trial` to the config command: `mobiscroll config angular --trial`.

Running a demo locally requires a Mobiscroll trial or a license; setup is per framework at https://mobiscroll.com/docs/angular/getting-started/installation

## Related demos

- Previous: [Event Labels](https://demo.mobiscroll.com/angular/eventcalendar/event-labels.md) - Show colour-coded event labels inside each day cell of an Angular month view event calendar — events that don't fit open in a popover.
- Next: [Custom Event Sort Order](https://demo.mobiscroll.com/angular/eventcalendar/custom-event-sort.md) - Control event display order in an Angular event calendar — assign per-event priority values or supply a custom function to override the default ordering.
