Search results

Header customization

The header part of Scheduler can be customized easily with the built-in options available.

Show or Hide header bar

By default, the header bar holds the date and view navigation options, through which the user can switch between the dates and various views. This header bar can be hidden from the UI by setting false to the showHeaderBar property. It’s default value is true.

Source
Preview
app.component.ts
app.module.ts
datasource.ts
main.ts
import { Component } from '@angular/core';
import { EventSettingsModel, DayService, WeekService, WorkWeekService } from '@syncfusion/ej2-angular-schedule';
import { scheduleData } from './datasource.ts';
@Component({
    selector: 'app-root',
    providers: [DayService, WeekService, WorkWeekService],
    // specifies the template string for the Schedule component
    template: `<ejs-schedule width='100%' height='550px' [selectedDate]='selectedDate' [views]='views'[eventSettings]='eventSettings' [showHeaderBar]='showHeaderBar'>
    </ejs-schedule>`
})


export class AppComponent {
    public selectedDate: Date = new Date(2018, 1, 15);
    public views: Array<string> = ['Day', 'Week', 'WorkWeek'];
    public eventSettings: EventSettingsModel = {
        dataSource: scheduleData
    };
    public showHeaderBar: Boolean = false;
}
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { ScheduleModule } from '@syncfusion/ej2-angular-schedule';
import { TimePickerModule } from '@syncfusion/ej2-angular-calendars';
import { DayService, WeekService, WorkWeekService, MonthService, AgendaService, MonthAgendaService} from '@syncfusion/ej2-angular-schedule';
import { AppComponent } from './app.component';

/**
 * Module
 */
@NgModule({
    imports: [
        BrowserModule,
        ScheduleModule,
        TimePickerModule
    ],
    declarations: [AppComponent],
    bootstrap: [AppComponent],
    providers: [DayService, 
                WeekService, 
                WorkWeekService, 
                MonthService,
                AgendaService,
                MonthAgendaService]
})
export class AppModule { }
/**
 * Schedule datasource spec
 */

export let scheduleData: Object[] = [
  {
    Id: 1,
    Subject: "Explosion of Betelgeuse Star",
    StartTime: new Date(2018, 1, 11, 9, 30),
    EndTime: new Date(2018, 1, 11, 11, 0),
    CategoryColor: "#1aaa55"
  },
  {
    Id: 2,
    Subject: "Thule Air Crash Report",
    StartTime: new Date(2018, 1, 12, 12, 0),
    EndTime: new Date(2018, 1, 12, 14, 0),
    CategoryColor: "#357cd2"
  },
  {
    Id: 3,
    Subject: "Blue Moon Eclipse",
    StartTime: new Date(2018, 1, 13, 9, 30),
    EndTime: new Date(2018, 1, 13, 11, 0),
    CategoryColor: "#7fa900"
  },
  {
    Id: 4,
    Subject: "Meteor Showers in 2018",
    StartTime: new Date(2018, 1, 14, 13, 0),
    EndTime: new Date(2018, 1, 14, 14, 30),
    CategoryColor: "#ea7a57"
  },
  {
    Id: 5,
    Subject: "Milky Way as Melting pot",
    StartTime: new Date(2018, 1, 15, 12, 0),
    EndTime: new Date(2018, 1, 15, 14, 0),
    CategoryColor: "#00bdae"
  },
  {
    Id: 6,
    Subject: "Mysteries of Bermuda Triangle",
    StartTime: new Date(2018, 1, 15, 9, 30),
    EndTime: new Date(2018, 1, 15, 11, 0),
    CategoryColor: "#f57f17"
  },
  {
    Id: 7,
    Subject: "Glaciers and Snowflakes",
    StartTime: new Date(2018, 1, 16, 11, 0),
    EndTime: new Date(2018, 1, 16, 12, 30),
    CategoryColor: "#1aaa55"
  },
  {
    Id: 8,
    Subject: "Life on Mars",
    StartTime: new Date(2018, 1, 17, 9, 0),
    EndTime: new Date(2018, 1, 17, 10, 0),
    CategoryColor: "#357cd2"
  },
  {
    Id: 9,
    Subject: "Alien Civilization",
    StartTime: new Date(2018, 1, 19, 11, 0),
    EndTime: new Date(2018, 1, 19, 13, 0),
    CategoryColor: "#7fa900"
  },
  {
    Id: 10,
    Subject: "Wildlife Galleries",
    StartTime: new Date(2018, 1, 21, 11, 0),
    EndTime: new Date(2018, 1, 21, 13, 0),
    CategoryColor: "#ea7a57"
  },
  {
    Id: 11,
    Subject: "Best Photography 2018",
    StartTime: new Date(2018, 1, 22, 9, 30),
    EndTime: new Date(2018, 1, 22, 11, 0),
    CategoryColor: "#00bdae"
  },
  {
    Id: 12,
    Subject: "Smarter Puppies",
    StartTime: new Date(2018, 1, 9, 10, 0),
    EndTime: new Date(2018, 1, 9, 11, 30),
    CategoryColor: "#f57f17"
  },
  {
    Id: 13,
    Subject: "Myths of Andromeda Galaxy",
    StartTime: new Date(2018, 1, 7, 10, 30),
    EndTime: new Date(2018, 1, 7, 12, 30),
    CategoryColor: "#1aaa55"
  },
  {
    Id: 14,
    Subject: "Aliens vs Humans",
    StartTime: new Date(2018, 1, 5, 10, 0),
    EndTime: new Date(2018, 1, 5, 11, 30),
    CategoryColor: "#357cd2"
  },
  {
    Id: 15,
    Subject: "Facts of Humming Birds",
    StartTime: new Date(2018, 1, 20, 9, 30),
    EndTime: new Date(2018, 1, 20, 11, 0),
    CategoryColor: "#7fa900"
  },
  {
    Id: 16,
    Subject: "Sky Gazers",
    StartTime: new Date(2018, 1, 23, 11, 0),
    EndTime: new Date(2018, 1, 23, 13, 0),
    CategoryColor: "#ea7a57"
  },
  {
    Id: 17,
    Subject: "The Cycle of Seasons",
    StartTime: new Date(2018, 1, 12, 5, 30),
    EndTime: new Date(2018, 1, 12, 7, 30),
    CategoryColor: "#00bdae"
  },
  {
    Id: 18,
    Subject: "Space Galaxies and Planets",
    StartTime: new Date(2018, 1, 12, 17, 0),
    EndTime: new Date(2018, 1, 12, 18, 30),
    CategoryColor: "#f57f17"
  },
  {
    Id: 19,
    Subject: "Lifecycle of Bumblebee",
    StartTime: new Date(2018, 1, 15, 6, 0),
    EndTime: new Date(2018, 1, 15, 7, 30),
    CategoryColor: "#7fa900"
  },
  {
    Id: 20,
    Subject: "Sky Gazers",
    StartTime: new Date(2018, 1, 15, 16, 0),
    EndTime: new Date(2018, 1, 15, 18, 0),
    CategoryColor: "#ea7a57"
  }
];
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
import { enableProdMode } from '@angular/core';
import { AppModule } from './app.module';

enableProdMode();
platformBrowserDynamic().bootstrapModule(AppModule);

Customizing header bar

Apart from the default date navigation and view options available on the header bar, you can add custom items into the Scheduler header bar by making use of the actionBegin event. Here, an employee image is added to the header bar, clicking on which will open the popup showing that person’s short profile information.

Source
Preview
app.component.ts
app.module.ts
datasource.ts
main.ts
import { Component } from '@angular/core';
import { createElement, compile } from '@syncfusion/ej2-base';
import { ItemModel } from '@syncfusion/ej2-navigations';
import { Popup } from '@syncfusion/ej2-popups';
import { EventSettingsModel, ActionEventArgs, ToolbarActionArgs, MonthService } from '@syncfusion/ej2-angular-schedule';
import { scheduleData } from './datasource.ts';

@Component({
    selector: 'app-root',
    providers: [MonthService],
    // specifies the template string for the Schedule component
    template: `<ejs-schedule id='schedule' width='100%' height='550px' [selectedDate]='selectedDate' [views]='views' [eventSettings]='eventSettings' [showHeaderBar]='showHeaderBar'
    [currentView]='currentView' (actionBegin)='onActionBegin($event)'
    (actionComplete)='onActionComplete($event)'></ejs-schedule>`
})


export class AppComponent {
    public selectedDate: Date = new Date(2018, 1, 15);
    public views: Array<string> = ['Month'];
    public currentView: string = 'Month';
    public eventSettings: EventSettingsModel = {
        dataSource: scheduleData
    };
    public userContentEle: HTMLElement = createElement('div', {
        className: 'e-profile-wrapper'
    });
    public profilePopup: Popup;
    onActionBegin(args: ActionEventArgs & ToolbarActionArgs):void {
        if (args.requestType === 'toolbarItemRendering') {
            let userIconItem: ItemModel = {
                align: 'Right', prefixIcon: 'user-icon', text: 'Nancy', cssClass: 'e-schedule-user-icon'
            };
            args.items.push(userIconItem);
        }
    }
    onActionComplete(args: ActionEventArgs):void {
        let scheduleElement: HTMLElement = document.getElementById('schedule') as HTMLElement;
        if (args.requestType === 'toolBarItemRendered') {
            let userIconEle: HTMLElement = scheduleElement.querySelector('.e-schedule-user-icon') as HTMLElement;
            userIconEle.onclick = () => {
                this.profilePopup.relateTo = userIconEle;
                this.profilePopup.dataBind();
                if (this.profilePopup.element.classList.contains('e-popup-close')) {
                    this.profilePopup.show();
                } else {
                    this.profilePopup.hide();
                }
            };
        }

        let userContentEle: HTMLElement = createElement('div', {
            className: 'e-profile-wrapper'
        });
        scheduleElement.parentElement.appendChild(userContentEle);

        let userIconEle: HTMLElement = scheduleElement.querySelector('.e-schedule-user-icon') as HTMLElement;
        let getDOMString: (data: object) => NodeList = compile('<div class="profile-container"><div class="profile-image">' +
            '</div><div class="content-wrap"><div class="name">Nancy</div>' +
            '<div class="destination">Product Manager</div><div class="status">' +
            '<div class="status-icon"></div>Online</div></div></div>');
        let output: NodeList = getDOMString({});
        this.profilePopup = new Popup(userContentEle, {
            content: output[0] as HTMLElement,
            relateTo: userIconEle,
            position: { X: 'left', Y: 'bottom' },
            collision: { X: 'flip', Y: 'flip' },
            targetType: 'relative',
            viewPortElement: scheduleElement,
            width: 185,
            height: 80
        });
        this.profilePopup.hide();
    }
}
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { ScheduleModule } from '@syncfusion/ej2-angular-schedule';
import { TimePickerModule } from '@syncfusion/ej2-angular-calendars';
import { DayService, WeekService, WorkWeekService, MonthService, AgendaService, MonthAgendaService} from '@syncfusion/ej2-angular-schedule';
import { AppComponent } from './app.component';

/**
 * Module
 */
@NgModule({
    imports: [
        BrowserModule,
        ScheduleModule,
        TimePickerModule
    ],
    declarations: [AppComponent],
    bootstrap: [AppComponent],
    providers: [DayService, 
                WeekService, 
                WorkWeekService, 
                MonthService,
                AgendaService,
                MonthAgendaService]
})
export class AppModule { }
/**
 * Schedule datasource spec
 */

export let scheduleData: Object[] = [
  {
    Id: 1,
    Subject: "Explosion of Betelgeuse Star",
    StartTime: new Date(2018, 1, 11, 9, 30),
    EndTime: new Date(2018, 1, 11, 11, 0),
    CategoryColor: "#1aaa55"
  },
  {
    Id: 2,
    Subject: "Thule Air Crash Report",
    StartTime: new Date(2018, 1, 12, 12, 0),
    EndTime: new Date(2018, 1, 12, 14, 0),
    CategoryColor: "#357cd2"
  },
  {
    Id: 3,
    Subject: "Blue Moon Eclipse",
    StartTime: new Date(2018, 1, 13, 9, 30),
    EndTime: new Date(2018, 1, 13, 11, 0),
    CategoryColor: "#7fa900"
  },
  {
    Id: 4,
    Subject: "Meteor Showers in 2018",
    StartTime: new Date(2018, 1, 14, 13, 0),
    EndTime: new Date(2018, 1, 14, 14, 30),
    CategoryColor: "#ea7a57"
  },
  {
    Id: 5,
    Subject: "Milky Way as Melting pot",
    StartTime: new Date(2018, 1, 15, 12, 0),
    EndTime: new Date(2018, 1, 15, 14, 0),
    CategoryColor: "#00bdae"
  },
  {
    Id: 6,
    Subject: "Mysteries of Bermuda Triangle",
    StartTime: new Date(2018, 1, 15, 9, 30),
    EndTime: new Date(2018, 1, 15, 11, 0),
    CategoryColor: "#f57f17"
  },
  {
    Id: 7,
    Subject: "Glaciers and Snowflakes",
    StartTime: new Date(2018, 1, 16, 11, 0),
    EndTime: new Date(2018, 1, 16, 12, 30),
    CategoryColor: "#1aaa55"
  },
  {
    Id: 8,
    Subject: "Life on Mars",
    StartTime: new Date(2018, 1, 17, 9, 0),
    EndTime: new Date(2018, 1, 17, 10, 0),
    CategoryColor: "#357cd2"
  },
  {
    Id: 9,
    Subject: "Alien Civilization",
    StartTime: new Date(2018, 1, 19, 11, 0),
    EndTime: new Date(2018, 1, 19, 13, 0),
    CategoryColor: "#7fa900"
  },
  {
    Id: 10,
    Subject: "Wildlife Galleries",
    StartTime: new Date(2018, 1, 21, 11, 0),
    EndTime: new Date(2018, 1, 21, 13, 0),
    CategoryColor: "#ea7a57"
  },
  {
    Id: 11,
    Subject: "Best Photography 2018",
    StartTime: new Date(2018, 1, 22, 9, 30),
    EndTime: new Date(2018, 1, 22, 11, 0),
    CategoryColor: "#00bdae"
  },
  {
    Id: 12,
    Subject: "Smarter Puppies",
    StartTime: new Date(2018, 1, 9, 10, 0),
    EndTime: new Date(2018, 1, 9, 11, 30),
    CategoryColor: "#f57f17"
  },
  {
    Id: 13,
    Subject: "Myths of Andromeda Galaxy",
    StartTime: new Date(2018, 1, 7, 10, 30),
    EndTime: new Date(2018, 1, 7, 12, 30),
    CategoryColor: "#1aaa55"
  },
  {
    Id: 14,
    Subject: "Aliens vs Humans",
    StartTime: new Date(2018, 1, 5, 10, 0),
    EndTime: new Date(2018, 1, 5, 11, 30),
    CategoryColor: "#357cd2"
  },
  {
    Id: 15,
    Subject: "Facts of Humming Birds",
    StartTime: new Date(2018, 1, 20, 9, 30),
    EndTime: new Date(2018, 1, 20, 11, 0),
    CategoryColor: "#7fa900"
  },
  {
    Id: 16,
    Subject: "Sky Gazers",
    StartTime: new Date(2018, 1, 23, 11, 0),
    EndTime: new Date(2018, 1, 23, 13, 0),
    CategoryColor: "#ea7a57"
  },
  {
    Id: 17,
    Subject: "The Cycle of Seasons",
    StartTime: new Date(2018, 1, 12, 5, 30),
    EndTime: new Date(2018, 1, 12, 7, 30),
    CategoryColor: "#00bdae"
  },
  {
    Id: 18,
    Subject: "Space Galaxies and Planets",
    StartTime: new Date(2018, 1, 12, 17, 0),
    EndTime: new Date(2018, 1, 12, 18, 30),
    CategoryColor: "#f57f17"
  },
  {
    Id: 19,
    Subject: "Lifecycle of Bumblebee",
    StartTime: new Date(2018, 1, 15, 6, 0),
    EndTime: new Date(2018, 1, 15, 7, 30),
    CategoryColor: "#7fa900"
  },
  {
    Id: 20,
    Subject: "Sky Gazers",
    StartTime: new Date(2018, 1, 15, 16, 0),
    EndTime: new Date(2018, 1, 15, 18, 0),
    CategoryColor: "#ea7a57"
  }
];
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
import { enableProdMode } from '@angular/core';
import { AppModule } from './app.module';

enableProdMode();
platformBrowserDynamic().bootstrapModule(AppModule);

Date header customization

The Scheduler UI that displays the date text on all views are considered as the date header cells. You can customize the date header cells of Scheduler either using dateHeaderTemplate or renderCell event.

Using date header template

The dateHeaderTemplate option is used to customize the date header cells of day, week and work-week views.

Source
Preview
app.component.ts
app.module.ts
datasource.ts
main.ts
import { Component } from '@angular/core';
import { Internationalization } from '@syncfusion/ej2-base';
import { EventSettingsModel, DayService, WeekService, AgendaService, TimelineViewsService, TimelineMonthService } from '@syncfusion/ej2-angular-schedule';
import { scheduleData } from './datasource.ts';
@Component({
    selector: 'app-root',
    providers: [DayService, WeekService, AgendaService, TimelineViewsService, TimelineMonthService],
    // specifies the template string for the Schedule component
    template: `<ejs-schedule id='schedule' width='100%' height='550px' [cssClass]='cssClass'
    [selectedDate]='selectedDate' [views]='views' [eventSettings]='eventSettings'>
    <ng-template #dateHeaderTemplate let-data>
        <div class="date-text">{{getDateHeaderText(data.date)}}</div>
        <div [innerHTML]="getWeather(data.date)"></div>
    </ng-template>
    </ejs-schedule>`
})


export class AppComponent {
    public selectedDate: Date = new Date(2018, 1, 15);
    public views: Array<string> = ['Day', 'Week', 'Agenda', 'TimelineWorkWeek', 'TimelineMonth'];
    public eventSettings: EventSettingsModel = {
        dataSource: scheduleData
    };
    public cssClass: string = 'schedule-date-header-template';
    public instance: Internationalization = new Internationalization();
    getDateHeaderText: Function = (value: Date) => {
        return this.instance.formatDate(value, { skeleton: 'Ed' });
    };
    getWeather: Function = (value: Date) => {
        switch (value.getDay()) {
            case 0:
                return '<div class="weather-text">25°C</div>';
            case 1:
                return '<div class="weather-text">18°C</div>';
            case 2:
                return '<div class="weather-text">10°C</div>';
            case 3:
                return '<div class="weather-text">16°C</div>';
            case 4:
                return '<div class="weather-text">8°C</div>';
            case 5:
                return '<div class="weather-text">27°C</div>';
            case 6:
                return '<div class="weather-text">17°C</div>';
            default:
                return null;
        }
    }
}
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { ScheduleModule } from '@syncfusion/ej2-angular-schedule';
import { TimePickerModule } from '@syncfusion/ej2-angular-calendars';
import { DayService, WeekService, WorkWeekService, MonthService, AgendaService, MonthAgendaService} from '@syncfusion/ej2-angular-schedule';
import { AppComponent } from './app.component';

/**
 * Module
 */
@NgModule({
    imports: [
        BrowserModule,
        ScheduleModule,
        TimePickerModule
    ],
    declarations: [AppComponent],
    bootstrap: [AppComponent],
    providers: [DayService, 
                WeekService, 
                WorkWeekService, 
                MonthService,
                AgendaService,
                MonthAgendaService]
})
export class AppModule { }
/**
 * Schedule datasource spec
 */

export let scheduleData: Object[] = [
  {
    Id: 1,
    Subject: "Explosion of Betelgeuse Star",
    StartTime: new Date(2018, 1, 11, 9, 30),
    EndTime: new Date(2018, 1, 11, 11, 0),
    CategoryColor: "#1aaa55"
  },
  {
    Id: 2,
    Subject: "Thule Air Crash Report",
    StartTime: new Date(2018, 1, 12, 12, 0),
    EndTime: new Date(2018, 1, 12, 14, 0),
    CategoryColor: "#357cd2"
  },
  {
    Id: 3,
    Subject: "Blue Moon Eclipse",
    StartTime: new Date(2018, 1, 13, 9, 30),
    EndTime: new Date(2018, 1, 13, 11, 0),
    CategoryColor: "#7fa900"
  },
  {
    Id: 4,
    Subject: "Meteor Showers in 2018",
    StartTime: new Date(2018, 1, 14, 13, 0),
    EndTime: new Date(2018, 1, 14, 14, 30),
    CategoryColor: "#ea7a57"
  },
  {
    Id: 5,
    Subject: "Milky Way as Melting pot",
    StartTime: new Date(2018, 1, 15, 12, 0),
    EndTime: new Date(2018, 1, 15, 14, 0),
    CategoryColor: "#00bdae"
  },
  {
    Id: 6,
    Subject: "Mysteries of Bermuda Triangle",
    StartTime: new Date(2018, 1, 15, 9, 30),
    EndTime: new Date(2018, 1, 15, 11, 0),
    CategoryColor: "#f57f17"
  },
  {
    Id: 7,
    Subject: "Glaciers and Snowflakes",
    StartTime: new Date(2018, 1, 16, 11, 0),
    EndTime: new Date(2018, 1, 16, 12, 30),
    CategoryColor: "#1aaa55"
  },
  {
    Id: 8,
    Subject: "Life on Mars",
    StartTime: new Date(2018, 1, 17, 9, 0),
    EndTime: new Date(2018, 1, 17, 10, 0),
    CategoryColor: "#357cd2"
  },
  {
    Id: 9,
    Subject: "Alien Civilization",
    StartTime: new Date(2018, 1, 19, 11, 0),
    EndTime: new Date(2018, 1, 19, 13, 0),
    CategoryColor: "#7fa900"
  },
  {
    Id: 10,
    Subject: "Wildlife Galleries",
    StartTime: new Date(2018, 1, 21, 11, 0),
    EndTime: new Date(2018, 1, 21, 13, 0),
    CategoryColor: "#ea7a57"
  },
  {
    Id: 11,
    Subject: "Best Photography 2018",
    StartTime: new Date(2018, 1, 22, 9, 30),
    EndTime: new Date(2018, 1, 22, 11, 0),
    CategoryColor: "#00bdae"
  },
  {
    Id: 12,
    Subject: "Smarter Puppies",
    StartTime: new Date(2018, 1, 9, 10, 0),
    EndTime: new Date(2018, 1, 9, 11, 30),
    CategoryColor: "#f57f17"
  },
  {
    Id: 13,
    Subject: "Myths of Andromeda Galaxy",
    StartTime: new Date(2018, 1, 7, 10, 30),
    EndTime: new Date(2018, 1, 7, 12, 30),
    CategoryColor: "#1aaa55"
  },
  {
    Id: 14,
    Subject: "Aliens vs Humans",
    StartTime: new Date(2018, 1, 5, 10, 0),
    EndTime: new Date(2018, 1, 5, 11, 30),
    CategoryColor: "#357cd2"
  },
  {
    Id: 15,
    Subject: "Facts of Humming Birds",
    StartTime: new Date(2018, 1, 20, 9, 30),
    EndTime: new Date(2018, 1, 20, 11, 0),
    CategoryColor: "#7fa900"
  },
  {
    Id: 16,
    Subject: "Sky Gazers",
    StartTime: new Date(2018, 1, 23, 11, 0),
    EndTime: new Date(2018, 1, 23, 13, 0),
    CategoryColor: "#ea7a57"
  },
  {
    Id: 17,
    Subject: "The Cycle of Seasons",
    StartTime: new Date(2018, 1, 12, 5, 30),
    EndTime: new Date(2018, 1, 12, 7, 30),
    CategoryColor: "#00bdae"
  },
  {
    Id: 18,
    Subject: "Space Galaxies and Planets",
    StartTime: new Date(2018, 1, 12, 17, 0),
    EndTime: new Date(2018, 1, 12, 18, 30),
    CategoryColor: "#f57f17"
  },
  {
    Id: 19,
    Subject: "Lifecycle of Bumblebee",
    StartTime: new Date(2018, 1, 15, 6, 0),
    EndTime: new Date(2018, 1, 15, 7, 30),
    CategoryColor: "#7fa900"
  },
  {
    Id: 20,
    Subject: "Sky Gazers",
    StartTime: new Date(2018, 1, 15, 16, 0),
    EndTime: new Date(2018, 1, 15, 18, 0),
    CategoryColor: "#ea7a57"
  }
];
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
import { enableProdMode } from '@angular/core';
import { AppModule } from './app.module';

enableProdMode();
platformBrowserDynamic().bootstrapModule(AppModule);

Using renderCell event

In month view, the date header template is not applicable and therefore the same customization can be added beside the date text in month cells by making use of the renderCell event.

Source
Preview
app.component.ts
app.module.ts
datasource.ts
main.ts
import { Component } from '@angular/core';
import { EventSettingsModel, MonthService, RenderCellEventArgs } from '@syncfusion/ej2-angular-schedule';
import { scheduleData } from './datasource.ts';
@Component({
    selector: 'app-root',
    providers: [MonthService],
    // specifies the template string for the Schedule component
    template: `<ejs-schedule id='schedule' width='100%' height='550px' [cssClass]='cssClass' [selectedDate]='selectedDate' [views]='views' [eventSettings]='eventSettings'
    (renderCell)='onRenderCell($event)'></ejs-schedule>`
})


export class AppComponent {
    public selectedDate: Date = new Date(2018, 1, 15);
    public views: Array<string> = ['Month'];
    public eventSettings: EventSettingsModel = {
        dataSource: scheduleData
    };
    public cssClass: string = 'schedule-date-header-template';
    onRenderCell(args: RenderCellEventArgs): void {
        if (args.elementType === 'monthCells') {
            let ele: Element = document.createElement('div');
            ele.innerHTML = this.getWeather(args.date);
            (args.element).appendChild(ele.firstChild);
        }
    }
    getWeather: Function = (value: Date) => {
        switch (value.getDay()) {
            case 0:
                return '<div class="weather-text">25°C</div>';
            case 1:
                return '<div class="weather-text">18°C</div>';
            case 2:
                return '<div class="weather-text">10°C</div>';
            case 3:
                return '<div class="weather-text">16°C</div>';
            case 4:
                return '<div class="weather-text">8°C</div>';
            case 5:
                return '<div class="weather-text">27°C</div>';
            case 6:
                return '<div class="weather-text">17°C</div>';
            default:
                return null;
        }
    }
}
import { NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { ScheduleModule } from '@syncfusion/ej2-angular-schedule';
import { TimePickerModule } from '@syncfusion/ej2-angular-calendars';
import { DayService, WeekService, WorkWeekService, MonthService, AgendaService, MonthAgendaService} from '@syncfusion/ej2-angular-schedule';
import { AppComponent } from './app.component';

/**
 * Module
 */
@NgModule({
    imports: [
        BrowserModule,
        ScheduleModule,
        TimePickerModule
    ],
    declarations: [AppComponent],
    bootstrap: [AppComponent],
    providers: [DayService, 
                WeekService, 
                WorkWeekService, 
                MonthService,
                AgendaService,
                MonthAgendaService]
})
export class AppModule { }
/**
 * Schedule datasource spec
 */

export let scheduleData: Object[] = [
  {
    Id: 1,
    Subject: "Explosion of Betelgeuse Star",
    StartTime: new Date(2018, 1, 11, 9, 30),
    EndTime: new Date(2018, 1, 11, 11, 0),
    CategoryColor: "#1aaa55"
  },
  {
    Id: 2,
    Subject: "Thule Air Crash Report",
    StartTime: new Date(2018, 1, 12, 12, 0),
    EndTime: new Date(2018, 1, 12, 14, 0),
    CategoryColor: "#357cd2"
  },
  {
    Id: 3,
    Subject: "Blue Moon Eclipse",
    StartTime: new Date(2018, 1, 13, 9, 30),
    EndTime: new Date(2018, 1, 13, 11, 0),
    CategoryColor: "#7fa900"
  },
  {
    Id: 4,
    Subject: "Meteor Showers in 2018",
    StartTime: new Date(2018, 1, 14, 13, 0),
    EndTime: new Date(2018, 1, 14, 14, 30),
    CategoryColor: "#ea7a57"
  },
  {
    Id: 5,
    Subject: "Milky Way as Melting pot",
    StartTime: new Date(2018, 1, 15, 12, 0),
    EndTime: new Date(2018, 1, 15, 14, 0),
    CategoryColor: "#00bdae"
  },
  {
    Id: 6,
    Subject: "Mysteries of Bermuda Triangle",
    StartTime: new Date(2018, 1, 15, 9, 30),
    EndTime: new Date(2018, 1, 15, 11, 0),
    CategoryColor: "#f57f17"
  },
  {
    Id: 7,
    Subject: "Glaciers and Snowflakes",
    StartTime: new Date(2018, 1, 16, 11, 0),
    EndTime: new Date(2018, 1, 16, 12, 30),
    CategoryColor: "#1aaa55"
  },
  {
    Id: 8,
    Subject: "Life on Mars",
    StartTime: new Date(2018, 1, 17, 9, 0),
    EndTime: new Date(2018, 1, 17, 10, 0),
    CategoryColor: "#357cd2"
  },
  {
    Id: 9,
    Subject: "Alien Civilization",
    StartTime: new Date(2018, 1, 19, 11, 0),
    EndTime: new Date(2018, 1, 19, 13, 0),
    CategoryColor: "#7fa900"
  },
  {
    Id: 10,
    Subject: "Wildlife Galleries",
    StartTime: new Date(2018, 1, 21, 11, 0),
    EndTime: new Date(2018, 1, 21, 13, 0),
    CategoryColor: "#ea7a57"
  },
  {
    Id: 11,
    Subject: "Best Photography 2018",
    StartTime: new Date(2018, 1, 22, 9, 30),
    EndTime: new Date(2018, 1, 22, 11, 0),
    CategoryColor: "#00bdae"
  },
  {
    Id: 12,
    Subject: "Smarter Puppies",
    StartTime: new Date(2018, 1, 9, 10, 0),
    EndTime: new Date(2018, 1, 9, 11, 30),
    CategoryColor: "#f57f17"
  },
  {
    Id: 13,
    Subject: "Myths of Andromeda Galaxy",
    StartTime: new Date(2018, 1, 7, 10, 30),
    EndTime: new Date(2018, 1, 7, 12, 30),
    CategoryColor: "#1aaa55"
  },
  {
    Id: 14,
    Subject: "Aliens vs Humans",
    StartTime: new Date(2018, 1, 5, 10, 0),
    EndTime: new Date(2018, 1, 5, 11, 30),
    CategoryColor: "#357cd2"
  },
  {
    Id: 15,
    Subject: "Facts of Humming Birds",
    StartTime: new Date(2018, 1, 20, 9, 30),
    EndTime: new Date(2018, 1, 20, 11, 0),
    CategoryColor: "#7fa900"
  },
  {
    Id: 16,
    Subject: "Sky Gazers",
    StartTime: new Date(2018, 1, 23, 11, 0),
    EndTime: new Date(2018, 1, 23, 13, 0),
    CategoryColor: "#ea7a57"
  },
  {
    Id: 17,
    Subject: "The Cycle of Seasons",
    StartTime: new Date(2018, 1, 12, 5, 30),
    EndTime: new Date(2018, 1, 12, 7, 30),
    CategoryColor: "#00bdae"
  },
  {
    Id: 18,
    Subject: "Space Galaxies and Planets",
    StartTime: new Date(2018, 1, 12, 17, 0),
    EndTime: new Date(2018, 1, 12, 18, 30),
    CategoryColor: "#f57f17"
  },
  {
    Id: 19,
    Subject: "Lifecycle of Bumblebee",
    StartTime: new Date(2018, 1, 15, 6, 0),
    EndTime: new Date(2018, 1, 15, 7, 30),
    CategoryColor: "#7fa900"
  },
  {
    Id: 20,
    Subject: "Sky Gazers",
    StartTime: new Date(2018, 1, 15, 16, 0),
    EndTime: new Date(2018, 1, 15, 18, 0),
    CategoryColor: "#ea7a57"
  }
];
import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
import { enableProdMode } from '@angular/core';
import { AppModule } from './app.module';

enableProdMode();
platformBrowserDynamic().bootstrapModule(AppModule);