Angular Timeline Multiple Timezone Support

If the context requires users being able to change the timezone on the fly, you can add a custom dropdown with the desired timezones to the event calendar header. This can be of course placed externally to the calendar as well, eg. setting page.

Set the timezone of the incoming data through the dataTimezone - eg. 'utc', and set the display timezone through the displayTimezone - eg. 'America/Los_Angeles'

Get started with this example

Demo

Loading the live demo

Preview in full screen

Let users switch the display timezone on the fly via a custom dropdown in the Timeline header — data and display timezones are set independently.

Code

import { CommonModule } from '@angular/common';
import { Component } from '@angular/core';
import { FormsModule } from '@angular/forms';
import {
  dayjsTimezone,
  MbscCalendarEvent,
  MbscEventcalendarOptions,
  MbscModule,
  MbscResource,
  setOptions ,
} from '@mobiscroll/angular';
import dayjs from 'dayjs';
import timezone from 'dayjs/plugin/timezone';
import utc from 'dayjs/plugin/utc';

dayjs.extend(utc);
dayjs.extend(timezone);
dayjsTimezone.dayjs = dayjs;

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

@Component({
  selector: 'app-root', 
  templateUrl: './app.component.html',
  standalone: true,
  imports: [CommonModule, FormsModule, MbscModule],
})
export class AppComponent {
  myEvents: MbscCalendarEvent[] = [
    {
      start: '2026-11-06T07:00',
      end: '2026-11-06T09:00',
      title: 'Stakeholder mtg.',
      resource: [1, 2, 4],
    },
    {
      start: '2026-11-09T18:00',
      end: '2026-11-09T19:30',
      title: 'Wrapup mtg.',
      resource: [2, 3, 5],
    },
    {
      start: '2026-11-06T14:00',
      end: '2026-11-06T18:00',
      title: 'Business of Software Conference',
      resource: [1, 3],
    },
    {
      start: '2026-11-07T20:00',
      end: '2026-11-07T21:50',
      title: 'Product Team mtg.',
      resource: [2, 3, 4],
    },
    {
      start: '2026-11-05T13:00',
      end: '2026-11-05T15:00',
      title: 'Decision Making mtg.',
      resource: [1, 4, 5],
    },
    {
      start: '2026-11-07T13:00',
      end: '2026-11-07T14:00',
      title: 'Quick mtg. with Martin',
      resource: 3,
    },
    {
      start: '2026-11-09T12:00',
      end: '2026-11-09T16:00',
      title: 'Team-Building',
      resource: [1, 2, 3, 4, 5],
    },
  ];

  myResources: MbscResource[] = [
    {
      id: 1,
      name: 'Resource A',
      color: '#fdf500',
    },
    {
      id: 2,
      name: 'Resource B',
      color: '#ff0101',
    },
    {
      id: 3,
      name: 'Resource C',
      color: '#01adff',
    },
    {
      id: 4,
      name: 'Resource D',
      color: '#239a21',
    },
    {
      id: 5,
      name: 'Resource E',
      color: '#ff4600',
    },
  ];

  timezone = 'utc';
  timezones = [
    {
      text: 'America/Los Angeles',
      value: 'America/Los_Angeles',
    },
    {
      text: 'America/Chicago',
      value: 'America/Chicago',
    },
    {
      text: 'America/New York',
      value: 'America/New_York',
    },
    {
      text: 'UTC',
      value: 'utc',
    },
    {
      text: 'Europe/London',
      value: 'Europe/London',
    },
    {
      text: 'Europe/Berlin',
      value: 'Europe/Berlin',
    },
    {
      text: 'Europe/Bucharest',
      value: 'Europe/Bucharest',
    },
    {
      text: 'Asia/Shanghai',
      value: 'Asia/Shanghai',
    },
    {
      text: 'Asia/Tokyo',
      value: 'Asia/Tokyo',
    },
  ];

  eventSettings: MbscEventcalendarOptions = {
    view: {
      timeline: { type: 'week' },
    },
    dragToCreate: true,
    dragToMove: true,
    dragToResize: true,
    timezonePlugin: dayjsTimezone,
    dataTimezone: 'utc',
  };

  onChange(ev: any) {
    this.timezone = ev.value;
  }
}

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.