Colored Cell Backgrounds

Color the background of the days with the colors option. You can specify backgrounds as exact dates, ranges or set up recurring rules. The recurring object works the same way as for the events.

Use the onPageLoading lifecycle event to color backgrounds runtime. You can learn about lifecycle events and places where to drop logic to customize the experience.

Want to color time ranges & days in the scheduler?  Learn how to do it →
Get started with this example

Demo

Loading the live demo

Preview in full screen

Color day-cell backgrounds in a event calendar — mark exact or recuring dates or date ranges as visual highlights for holidays and special days.

Code

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

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

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

  myEvents: MbscCalendarEvent[] = [];

  settings: MbscEventcalendarOptions = {
    clickToCreate:  ,
    dragToCreate:  ,
    dragToMove:  ,
    dragToResize:  ,
    eventDelete:  ,
    colors: [
      {
        start: '2026-09-30T00:00',
        end: '2026-10-01T00:00',
        background: '#fde4c880',
      },
      {
        start: '2026-10-17T00:00',
        end: '2026-10-20T00:00',
        background: '#d5f1ea80',
      },
      {
        date: '2026-10-29T00:00',
        background: '#ffdbdb80',
      },
      {
        date: '2026-11-03T00:00',
        background: '#fbedd080',
      },
      {
        date: '2026-11-10T00:00',
        background: '#fbedd080',
      },
      {
        background: '#d6e81e1a',
        recurring: {
          repeat: 'monthly',
          day: -1,
        },
      },
    ],
  };

  ngOnInit(): void {
    this.http.jsonp<MbscCalendarEvent[]>('https://trial.mobiscroll.com/events/?vers=5', '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.