Event Content

Above the built in look & feel, the events can be customized in two ways:

  • Full event customization - The agenda handles the listing and ordering of the events, while the full styling falls into your hands. Explore this example for more details.
  • Content-only customization (like in this example) - When customizing only the content, the calendar handles the event start and end times, allDay and color rendering.

You will have to place and provide styling to the title field and any other custom fields you are using, like description, location, participants. You can add custom functionality, buttons and other custom components.

Pass the content template to the agendaEventContentTemplate option. All original event fields along with computed fields like isMultiDay, lastDay are available inside the template.

Get started with this example

Demo

Loading the live demo

Preview in full screen

Add custom fields, descriptions, participants, and action buttons to agenda items — the agenda renders time and color automatically.

Code

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

setOptions({
  locale:  ,
  theme: ' ',
  themeVariant: ' '
});

@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[] = [];

  myParticipants: Record<number, { img: string; name: string }> = {
    1: { name: 'Barry L.', img: 'https://img.mobiscroll.com/demos/m1.png' },
    2: { name: 'Hortense T.', img: 'https://img.mobiscroll.com/demos/f1.png' },
    3: { name: 'Carl H.', img: 'https://img.mobiscroll.com/demos/m2.png' },
  };

  myView: MbscEventcalendarView = {
    calendar: { type: 'week' },
    agenda: { type: 'day' },
  };

  add(data: MbscCalendarEvent): void {
    this.notify.toast({
      message: data.title + ' clicked',
    });
  }

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

Duplicate Session

You have signed in on a different machine. To keep everything in sync, you have been signed out of this session.

If you need to invite team members, manage seats and accounts you can do it from the licenses page.

Duplicate Session

We noticed you are logged in on a different machine and have closed your old session.

If you need to invite team members, manage seats and accounts you can do it from the licenses page.