Event Calendar for Angular and Ionic 2/3/4

Learn about Event Calendar

Responsive event calendar with month view, variable week view, range view and event listing.

Supporting one-time, recurring, all-day and multi-day events with pop-over and schedule listing capability. Use it for mobile, desktop and responsive websites.

Shipping with useful features for a refined UX, including:

  • Usage on mobile and desktop with responsive features
  • Single and multi-day events
  • One-time and recurring events
  • Daily, weekly, monthly and custom event schedules
  • Month view, week view and range view
  • Liquid layout with inline display mode
  • Pop-over event listing or list view for schedule
  • Multiple theme support
  • RTL support
  • Full localization


Interested in calendar views? Other demos that could be useful:

Calendar Range


Event calendar demos available for other frameworks.

Viewing demos & code for

light
dark

Change the theme setting here

Event Calendar - Mobile month view

Change demo
Mobile month view

Use the event calendar for mobile, desktop and everything in-between. The content perfectly fills the parent container or the mobile screen in full width. You can chooose to render an agenda-view below the calendar broken up into days ordered chronologically. For more ways to customize the agenda view check out this example.

Interested to see how the event calendar looks on largers screens?  Check out the next demo →
import { MbscEventcalendarOptions } from '@mobiscroll/angular';
import { Jsonp } from '@angular/http';

@Component({
    selector: 'demo-app',
    templateUrl: './app.component.html'
})
export class AppComponent {

    constructor(private jsonp: Jsonp) {}

    events: any;

    ngOnInit() {
        this.jsonp.request('https://trial.mobiscroll.com/events/?callback=JSONP_CALLBACK').subscribe((res: any) => {
            this.events = res._body;
        });
    }

    eventSettings: MbscEventcalendarOptions = {
        lang: '',
        theme: '',
        display: 'inline',
        view: {
            calendar: { type: 'month' },
            eventList: { type: 'month' }
        }
    };
}
<mbsc-eventcalendar [data]="events" [options]="eventSettings"></mbsc-eventcalendar>

Event Calendar - Desktop month view

Change demo
Desktop month view

Depending on the screen width the calendar seamlesly transforms into a desktop-view using the available space more intelligently. The main difference between the mobile and desktop rendering is how the day cells are laid out. People can now see on a glance how many events a day holds and by clicking on day the event list will show up in a pop-over.

Interested to see how the event calendar looks on smaller screens?  Check out the previous demo →
import { MbscEventcalendarOptions } from '@mobiscroll/angular';
import { Jsonp } from '@angular/http';

@Component({
    selector: 'demo-app',
    templateUrl: './app.component.html'
})
export class AppComponent {
    constructor(private jsonp: Jsonp) {}

    events: any;

    ngOnInit() {
        this.jsonp.request('https://trial.mobiscroll.com/events/?callback=JSONP_CALLBACK').subscribe((res: any) => {
            this.events = res._body;
        });
    }

    eventSettings: MbscEventcalendarOptions = {
        lang: '',
        theme: '',
        display: 'inline',
        showEventCount: true,
        calendarHeight: 614
    };
}
<mbsc-eventcalendar [data]="events" [options]="eventSettings"></mbsc-eventcalendar>

Event Calendar - Responsive

Change demo
Responsive

The event calendar is fully responsive. It adapts to the available space and fills the screen to look good everywhere. While the you don't have to worry about the width the height can be manually adjusted with the calendarHeight property.

import { MbscEventcalendarOptions } from '@mobiscroll/angular';
import { Jsonp } from '@angular/http';

@Component({
    selector: 'demo-app',
    templateUrl: './app.component.html'
})
export class AppComponent {
    constructor(private jsonp: Jsonp) {}

    events: any;

    ngOnInit() {
        this.jsonp.request('https://trial.mobiscroll.com/events/?callback=JSONP_CALLBACK').subscribe((res: any) => {
            this.events = res._body;
        });
    }

    eventSettings: MbscEventcalendarOptions = {
        lang: '',
        theme: '',
        display: 'inline',
        calendarHeight: 513,
            view: {
                calendar: {
                    labels: true,
                    popover: true
                }
            }
    };
}
<mbsc-eventcalendar [data]="events" [options]="eventSettings"></mbsc-eventcalendar>

Event Calendar - Variable weeks

Change demo
Variable weeks

The calendar view supports variable weeks. Save space by only displaying one or two weeks or go for a full month where it makes sense. Use the weeks setting that expects a number of rows. The default is six weeks, but feel free to play around.

import { mobiscroll, MbscEventcalendarOptions } from '@mobiscroll/angular';
import { Jsonp } from '@angular/http';

mobiscroll.settings = {
    lang: '',
    theme: ''
};

@Component({
    selector: 'demo-app',
    templateUrl: './app.component.html'
})

export class AppComponent {
constructor(private jsonp: Jsonp) {}

    events: any;

    ngOnInit() {
        this.jsonp.request('https://trial.mobiscroll.com/events/?callback=JSONP_CALLBACK').subscribe((res: any) => {
            this.events = res._body;
        });
    }

    oneWeekSettings: MbscEventcalendarOptions = {
        display: 'inline',
        view: {
            calendar: { type: 'week' }
        }
    };

    twoWeekSettings: MbscEventcalendarOptions = {
        display: 'inline',
        view: {
            calendar: { type: 'week', size: 2 }
        }
    };

    threeWeekSettings: MbscEventcalendarOptions = {
        display: 'inline',
        view: {
            calendar: { type: 'week', size: 3 }
        }
    };
}
<mbsc-form>
    <div class="mbsc-grid">
        <div class="mbsc-row">
            <div class="mbsc-col-sm-12 mbsc-col-md-4">
                <div class="mbsc-form-group">
                    <div class="mbsc-form-group-title">One week view</div>
                    <mbsc-eventcalendar [data]="events" [options]="oneWeekSettings"></mbsc-eventcalendar>
                </div>
            </div>
            <div class="mbsc-col-sm-12 mbsc-col-md-4">
                <div class="mbsc-form-group">
                    <div class="mbsc-form-group-title">Two week view</div>
                    <mbsc-eventcalendar [data]="events" [options]="twoWeekSettings"></mbsc-eventcalendar>
                </div>
            </div>
            <div class="mbsc-col-sm-12 mbsc-col-md-4">
                <div class="mbsc-form-group">
                    <div class="mbsc-form-group-title">Three week view</div>
                    <mbsc-eventcalendar [data]="events" [options]="threeWeekSettings"></mbsc-eventcalendar>
                </div>
            </div>
        </div>
    </div>
</mbsc-form>

Event Calendar - Compact daily schedule

Change demo
Compact daily schedule

Use a compact week calendar that you can place at the top of your screen and list a daily schedule below. The calendar view is configured with the calendar object (take a look the previous example) while the agenda view is configured by the eventList setting. For more details on the agenda view see this example. Both are set up inside the view setting.

Days with events are marked with a little dot and days without any events have a localized empty view. Btw. the components are completely localized. Go on and check out this example.

import { MbscEventcalendarOptions } from '@mobiscroll/angular';
import { Jsonp } from '@angular/http';

@Component({
    selector: 'demo-app',
    templateUrl: './app.component.html'
})
export class AppComponent {
    constructor(private jsonp: Jsonp) {}

    events: any;

    ngOnInit() {
        this.jsonp.request('https://trial.mobiscroll.com/events/?callback=JSONP_CALLBACK').subscribe((res: any) => {
            this.events = res._body;
        });
    }

    eventSettings: MbscEventcalendarOptions = {
        display: 'inline',
        view: {
            calendar: { type: 'week' },
            eventList: { type: 'day' }
        }
    };
}
<mbsc-eventcalendar [data]="events" [options]="eventSettings"></mbsc-eventcalendar>

Event Calendar - Switching views

Change demo
Switching views

Dynamically switch views within one calendar instance. Use a UI control to let users do the switching or do it programatically.

The example features a month view with full event schedule, a week view with a weekly schedule and daily event list. Use the option method to dynamically change the settings.

Interested in building more complex views?  See how to synchronize a calendar and a separate event list →
import { ViewChild } from '@angular/core';
import { mobiscroll, MbscCalendar, MbscEventcalendarOptions } from '@mobiscroll/angular';
import { Jsonp } from '@angular/http';

mobiscroll.settings = {
    lang: '',
    theme: ''
};

let now = new Date();

@Component({
    selector: 'demo-app',
    templateUrl: './app.component.html'
})
export class AppComponent {
    constructor(private jsonp: Jsonp) {}
    
    @ViewChild('mbscCal')
    calendar: MbscCalendar;

    events: Array<any>;
    demo: Date;
    view: string = 'month';

    ngOnInit() {
        this.jsonp.request('https://trial.mobiscroll.com/events/?callback=JSONP_CALLBACK').subscribe((res: any) => {
            this.events = res._body;
        });
    }

    settings: MbscEventcalendarOptions = {
        display: 'inline',
        view: {
            calendar: { type: 'month' },
            eventList: { type: 'month' }
        }
    };

    changeView() {
        setTimeout(() => {
        switch (this.view) {
            case 'month':
                this.calendar.instance.option({
                    view: {
                        calendar: { type: 'month' },
                        eventList: { type: 'month' }
                    }
                });
                break;
            case 'week':
                this.calendar.instance.option({
                    view: {
                        calendar: { type: 'week' },
                        eventList: { type: 'week' }
                    }
                });
                break;
            case 'day':
                this.calendar.instance.option({
                    view: {
                        eventList: { type: 'day' }
                    }
                });
                break;
        }
        });
    }
}
<mbsc-form>
    <mbsc-form-group>
        <mbsc-form-group-title>Month, week and day view</mbsc-form-group-title>
        <mbsc-segmented-group [(ngModel)]="view" (change)="changeView()">
            <mbsc-segmented value="month">Month</mbsc-segmented>
            <mbsc-segmented value="week">Week</mbsc-segmented>
            <mbsc-segmented value="day">Day</mbsc-segmented>
        </mbsc-segmented-group>
        <mbsc-eventcalendar [data]="events" [options]="settings" #mbscCal="mobiscroll"></mbsc-eventcalendar>
    </mbsc-form-group>
</mbsc-form>

Event Calendar - Agenda view

Change demo
Agenda view

Use the eventList object, configurable inside the view setting to render a scrollable schedule or agenda view. type and size can be set:

  • day - eventList: { type: 'day', size: 20 } can be configured for a single day or a range of days
  • week - eventList: { type: 'week', size: 3 } can be configured for a single week or a range
  • month - eventList: { type: 'month' } can be configured for a single month or a range
Interested in combining this with a calendar view?  Check out the previous example →
import { mobiscroll, MbscEventcalendarOptions } from '@mobiscroll/angular';
import { Jsonp } from '@angular/http';

mobiscroll.settings = {
    lang: '',
    theme: ''
};

@Component({
    selector: 'demo-app',
    templateUrl: './app.component.html'
})
export class AppComponent {

    constructor(private jsonp: Jsonp) {}

    events: any;

    ngOnInit() {
        this.jsonp.request('https://trial.mobiscroll.com/events-new/?callback=JSONP_CALLBACK').subscribe((res: any) => {
            this.events = res._body;
        });
    }

    dailySettings: MbscEventcalendarOptions = {
        display: 'inline',
        view: {
            eventList: { type: 'day' }
        }
    };

    weeklySettings: MbscEventcalendarOptions = {
        display: 'inline',
        view: {
            eventList: { type: 'week' }
        }
    };

    monthlySettings: MbscEventcalendarOptions = {
        display: 'inline',
        view: {
            eventList: { type: 'month' }
        }
    };
}
<mbsc-form>
    <div class="mbsc-grid">
        <div class="mbsc-row">
            <div class="mbsc-col-sm-12 mbsc-col-md-4">
                <div class="mbsc-form-group">
                    <div class="mbsc-form-group-title">Daily schedule</div>
                    <mbsc-eventcalendar [data]="events" [options]="dailySettings"></mbsc-eventcalendar>
                </div>
            </div>
            <div class="mbsc-col-sm-12 mbsc-col-md-4">
                <div class="mbsc-form-group">
                    <div class="mbsc-form-group-title">Weekly schedule</div>
                    <mbsc-eventcalendar [data]="events" [options]="weeklySettings"></mbsc-eventcalendar>
                </div>
            </div>
            <div class="mbsc-col-sm-12 mbsc-col-md-4">
                <div class="mbsc-form-group">
                    <div class="mbsc-form-group-title">Monthly schedule</div>
                    <mbsc-eventcalendar [data]="events" [options]="monthlySettings"></mbsc-eventcalendar>
                </div>
            </div>
        </div>
    </div>
</mbsc-form>

Event Calendar - Synchronized views

Change demo
Synchronized views

You can usually get away with using a single event calendar instance, but being able to use and synchronize multiple views can come in handy.

In this example we have a two-pane layout with a calendar view on the left and a large agenda view on the right. Because the default rendering of agenda below the calendar doesn't fit we'll be needing two instances. The sync has to happen for both. The day view calls the navigate method of the calendar in its onPageChange event, while the calendar sets the day view with navigate from its onSetDate event.

import { ViewChild } from '@angular/core';
import { MbscEventcalendarOptions, MbscEventcalendar } from '@mobiscroll/angular';
import { Jsonp } from '@angular/http';

let preventSet;

@Component({
    selector: 'demo-app',
    templateUrl: './app.component.html'
})
export class AppComponent {
    @ViewChild('mbscMonthCal')
    monthCal: MbscEventcalendar;

    @ViewChild('mbscDayCal')
    dayCal: MbscEventcalendar;
    
    constructor(private jsonp: Jsonp) {}

    events: any;

    ngOnInit() {
        this.jsonp.request('https://trial.mobiscroll.com/events/?callback=JSONP_CALLBACK').subscribe((res: any) => {
            this.events = res._body;
        });
    }

    navigate(inst, val) {
        if (inst) {
            inst.navigate(val);
        }
    };

    monthSettings: MbscEventcalendarOptions = {
        lang: '',
        theme: '',
        display: 'inline',
        view: {
            calendar: { type: 'month' }
        },
        onSetDate: (event, inst) => {
            if (!preventSet) {
                this.navigate(this.dayCal.instance, event.date);
            }
            preventSet = false;
        }
    };

    daySettings: MbscEventcalendarOptions = {
        lang: '',
        theme: '',
        display: 'inline',
        view: {
            eventList: { type: 'day' }
        },
        onPageChange: (event, inst) => {
            preventSet = true;
            this.navigate(this.monthCal.instance, event.firstDay);
        }
    };

}
<div class="mbsc-grid md-demo-synchronized-views">
    <div class="mbsc-row mbsc-no-padding">
        <div class="mbsc-col-md-4 mbsc-col-12">
            <mbsc-eventcalendar [data]="events" [options]="monthSettings" #mbscMonthCal="mobiscroll"></mbsc-eventcalendar>
        </div>
        <div class="mbsc-col-md-8 mbsc-col-12 md-col-right">
            <mbsc-eventcalendar [data]="events" [options]="daySettings" #mbscDayCal="mobiscroll"></mbsc-eventcalendar>
        </div>
    </div>
</div>
.md-demo-synchronized-views {
    position: absolute;
    height: 100%;
}

.md-demo-synchronized-views .mbsc-row {
    height: 100%;
}

.md-demo-synchronized-views .md-col-right {
    overflow: auto;
    height: 100%;
    border-left: 1px solid #ccc;
}

Event Calendar - Marked, colored & labels

Change demo
Marked, colored & labels

For additional information you can mark days with colored dots, add labels or completely color the background of the days. This offers means to add more information to the calemdar that is valuable to users. Take a look at this example of marked days and description.

You can add these with exact dates, ranges, days of week, days of month and recurring dates. When processing a lot of data you can load the marked days, labels, colors dynamically in the onMonthChange event.

Want to show event data and use multiple labels?  We have an example for that →
import { mobiscroll, MbscEventcalendarOptions } from '@mobiscroll/angular';

mobiscroll.settings = {
    lang: '',
    theme: ''
};

var now = new Date();

@Component({
    selector: 'demo-app',
    templateUrl: './app.component.html'
})
export class AppComponent {
    markedDays: Array < any > = [
        { d: '5/1', color: '#ffc400' },
        { d: '12/24', color: '#ffee00' },
        { d: '12/25', color: 'red' },
        { d: new Date(now.getFullYear(), now.getMonth() + 1, 4) },
        { d: new Date(now.getFullYear(), now.getMonth() - 2, 13) },
        { d: new Date(now.getFullYear(), now.getMonth(), 2), color: '#46c4f3' },
        { d: new Date(now.getFullYear(), now.getMonth(), 6), color: '#7e56bd' },
        { d: new Date(now.getFullYear(), now.getMonth(), 11), color: '#7e56bd' },
        { d: new Date(now.getFullYear(), now.getMonth(), 19), color: '#89d7c9' },
        { d: new Date(now.getFullYear(), now.getMonth(), 28), color: '#ea4986' },
        { d: new Date(now.getFullYear(), now.getMonth(), 13), color: '#7e56bd' },
        { d: new Date(now.getFullYear(), now.getMonth(), 13), color: '#f13f77' },
        { d: new Date(now.getFullYear(), now.getMonth(), 13), color: '#89d7c9' },
        { d: new Date(now.getFullYear(), now.getMonth(), 13), color: '#8dec7d' },
        { d: new Date(now.getFullYear(), now.getMonth(), 21), color: '#ffc400' },
        { d: new Date(now.getFullYear(), now.getMonth(), 21), color: '#8dec7d' },
        { start: new Date(now.getFullYear(), now.getMonth() + 1, 15), end: new Date(now.getFullYear(), now.getMonth() + 1, 18), color: '#f4511e' }
    ];

    coloredDays: Array < any > = [
        { d: '12/8', background: '#9ccc65' },
        { d: '5/1', background: 'red' },
        { d: '12/24', background: "#fff568" },
        { d: '12/25', background: "#e88080" },
        { d: new Date(now.getFullYear(), now.getMonth() + 1, 4), background: '#cfd8dc' },
        { d: new Date(now.getFullYear(), now.getMonth() + 2, 24), background: '#9575cd' },
        { d: new Date(now.getFullYear(), now.getMonth() - 2, 13), background: '#d4e157' },
        { d: new Date(now.getFullYear(), now.getMonth() - 1, 6), background: "#f4511e" },
        { d: new Date(now.getFullYear(), now.getMonth() + 1, 6), background: '#46c4f3' },
        { d: new Date(now.getFullYear(), now.getMonth() + 1, 22), background: '#7e56bd' },
        { d: new Date(now.getFullYear(), now.getMonth() - 1, 11), background: '#46c4f3' },
        { d: new Date(now.getFullYear(), now.getMonth() - 1, 29), background: '#7e56bd' },
        { d: new Date(now.getFullYear(), now.getMonth(), 2), background: '#46c4f3' },
        { d: new Date(now.getFullYear(), now.getMonth(), 3), background: '#7e56bd' },
        { d: new Date(now.getFullYear(), now.getMonth(), 11), background: '#f13f77' },
        { d: new Date(now.getFullYear(), now.getMonth(), 19), background: '#8dec7d' },
        { d: new Date(now.getFullYear(), now.getMonth(), 28), background: '#ea4986' },
        { start: new Date(now.getFullYear(), now.getMonth() + 1, 15), end: new Date(now.getFullYear(), now.getMonth() + 1, 18), text: 'Conference', background: '#f4511e' }
    ];

    labelDays: Array < any > = [
        { d: '12/25', text: 'Christmas', color: "#f48fb1" },
        { d: '1/1', text: 'New year' },
        { d: '12/1', text: 'Meeting', color: '#ffc400' },
        { d: new Date(now.getFullYear(), now.getMonth() + 1, 4), text: 'Spa day', color: '#cfd8dc' },
        { d: new Date(now.getFullYear(), now.getMonth() + 2, 24), text: 'BD Party', color: '#9ccc65' },
        { d: new Date(now.getFullYear(), now.getMonth() - 2, 13), text: 'Exams', color: '#d4e157' },
        { d: new Date(now.getFullYear(), now.getMonth() - 1, 6), text: 'Trip', color: "#f4511e" },
        { d: new Date(now.getFullYear(), now.getMonth() + 1, 6), color: '#46c4f3', text: 'Pizza Night' },
        { d: new Date(now.getFullYear(), now.getMonth() + 1, 22), color: '#7e56bd', text: 'Beerpong' },
        { d: new Date(now.getFullYear(), now.getMonth() - 1, 11), color: '#46c4f3', text: 'Anniversary' },
        { d: new Date(now.getFullYear(), now.getMonth() - 1, 29), color: '#7e56bd', text: 'Pete BD' },
        { d: new Date(now.getFullYear(), now.getMonth(), 2), color: '#46c4f3', text: 'Ana BD' },
        { d: new Date(now.getFullYear(), now.getMonth(), 3), color: '#7e56bd', text: 'Concert' },
        { d: new Date(now.getFullYear(), now.getMonth(), 11), color: '#f13f77', text: 'Trip' },
        { d: new Date(now.getFullYear(), now.getMonth(), 19), color: '#8dec7d', text: 'Math exam' },
        { d: new Date(now.getFullYear(), now.getMonth(), 28), color: '#ea4986', text: 'Party' },
        { start: new Date(now.getFullYear(), now.getMonth() + 1, 15), end: new Date(now.getFullYear(), now.getMonth() + 1, 18), text: 'Conference', color: '#f4511e' }
    ];

}
<mbsc-form>
    <div class="mbsc-grid">
        <div class="mbsc-row">
            <div class="mbsc-col-sm-12 mbsc-col-md-4">
                <mbsc-form-group>
                    <mbsc-form-group-title>Marked days</mbsc-form-group-title>
                    <mbsc-calendar display="inline" [marked]="markedDays"></mbsc-calendar>
                </mbsc-form-group>
            </div>
            <div class="mbsc-col-sm-12 mbsc-col-md-4">
                <mbsc-form-group>
                    <mbsc-form-group-title>Colored days</mbsc-form-group-title>
                    <mbsc-calendar display="inline" [colors]="coloredDays"></mbsc-calendar>
                </mbsc-form-group>
            </div>
            <div class="mbsc-col-sm-12 mbsc-col-md-4">
                <mbsc-form-group>
                    <mbsc-form-group-title>Labels</mbsc-form-group-title>
                    <mbsc-calendar display="inline" [labels]="labelDays"></mbsc-calendar>
                </mbsc-form-group>
            </div>
        </div>
    </div>
</mbsc-form>

Event Calendar - Events as labels

Change demo
Events as labels

Events can be displayed a couple of different ways. Most of the time showing the event data inside and across the calendar cells is the way to go.

When configuring the calendar object, you can set labels: true. All of this happens under the view setting.

Rather show events in a pop-over?  Take a look at the next example →
import { MbscEventcalendarOptions } from '@mobiscroll/angular';
import { Jsonp } from '@angular/http';

@Component({
    selector: 'demo-app',
    templateUrl: './app.component.html'
})
export class AppComponent {
    constructor(private jsonp: Jsonp) {}

    events: any;

    ngOnInit() {
        this.jsonp.request('https://trial.mobiscroll.com/events/?callback=JSONP_CALLBACK').subscribe((res: any) => {
            this.events = res._body;
        });
    }

    eventSettings: MbscEventcalendarOptions = {
        lang: '',
        theme: '',
        display: 'inline',
        calendarHeight: 614,
        view: {
            calendar: {
                labels: true
            }
        }
    };
}
<mbsc-eventcalendar [data]="events" [options]="eventSettings"></mbsc-eventcalendar>

Event Calendar - Events in popover

Change demo
Events in popover

Besides displaying event labels or listing them in an agenda view, you can have them show up in a pop-over. Set it up though the calendar: {popover: true} object inside the view setting. Using the popover setting saves vertical space and provides a subtle cue to the user that there are events. A small dot will apear in day cells with events.

Would a full-blown event list help?  Take a look at the next example →
import { MbscEventcalendarOptions } from '@mobiscroll/angular';
import { Jsonp } from '@angular/http';

@Component({
    selector: 'demo-app',
    templateUrl: './app.component.html'
})
export class AppComponent {
    constructor(private jsonp: Jsonp) {}

    events: any;

    ngOnInit() {
        this.jsonp.request('https://trial.mobiscroll.com/events/?callback=JSONP_CALLBACK').subscribe((res: any) => {
            this.events = res._body;
        });
    }

    eventSettings: MbscEventcalendarOptions = {
        lang: '',
        theme: '',
        display: 'inline'
    };
}
<mbsc-eventcalendar [data]="events" [options]="eventSettings"></mbsc-eventcalendar>

Event Calendar - Events in agenda view

Change demo
Events in agenda view

The calendar view ships with two methods for listing events. Either as event labels or in a pop-over. Besides these two the third way is to configure an event list under the view setting.

Configure the event list like this view: {eventList: {type: 'month'}}.

Looking for more options for event lists?  Try the daily/weekly/monthly schedule →
import { MbscEventcalendarOptions } from '@mobiscroll/angular';
import { Jsonp } from '@angular/http';

@Component({
    selector: 'demo-app',
    templateUrl: './app.component.html'
})
export class AppComponent {

    constructor(private jsonp: Jsonp) {}

    events: any;

    ngOnInit() {
        this.jsonp.request('https://trial.mobiscroll.com/events/?callback=JSONP_CALLBACK').subscribe((res: any) => {
            this.events = res._body;
        });
    }
    
    eventSettings: MbscEventcalendarOptions = {
        lang: '',
        theme: '',
        display: 'inline',
        view: {
            calendar: { type: 'month' },
            eventList: { type: 'month' }
        }
    };
}
<div class="mbsc-grid-fixed mbsc-grid-md">
    <mbsc-eventcalendar [data]="events" [options]="eventSettings"></mbsc-eventcalendar>
</div>

Event Calendar - Custom event data

Change demo
Custom event data
Angular Event calendar with custom HTML for formatted event data. Bake in any markup, emoji or styling into the event list. For Angular 2/4/5/6/7 and Ionic 2/3/4.
import { MbscEventcalendarOptions } from '@mobiscroll/angular';

let now = new Date();

@Component({
    selector: 'demo-app',
    templateUrl: './app.component.html'
})
export class AppComponent {
    events: Array < any > = [{
        d: new Date(now.getFullYear(), now.getMonth(), 8, 8, 0),
        text: 'Green box to post office',
        color: '#6e7f29',
    }, {
        start: new Date(now.getFullYear(), now.getMonth(), 8, 8, 45),
        end: new Date(now.getFullYear(), now.getMonth(), 8, 9, 0),
        text: 'Quick mtg. with Martin <div class="mbsc-bold md-event-desc">Deal offer</div><div class="md-event-loc mbsc-txt-muted"><span class="mbsc-ic mbsc-ic-location"></span>13 Walnut Avenue, Eden Hazelton</div><span class="md-event-emoji">🎉</span>',
        color: '#de3d83',
        category: 'meeting',
        location: '13 Walnut Avenue, Eden Hazelton'
    }, {
        start: new Date(now.getFullYear(), now.getMonth(), 8, 9, 30),
        end: new Date(now.getFullYear(), now.getMonth(), 8, 10, 30),
        text: 'Product team mtg. <div class="mbsc-bold md-event-desc">Promote Justin</div><div class="md-event-loc mbsc-txt-muted"><span class="mbsc-ic mbsc-ic-location"></span>Office</div><span class="md-event-emoji">💬</span>',
        color: '#f67944',
        category: 'meeting',
        location: 'Office'
    }, {
        start: new Date(now.getFullYear(), now.getMonth(), 8, 11, 0),
        end: new Date(now.getFullYear(), now.getMonth(), 8, 11, 30),
        text: 'Stakeholder mtg. <div class="md-event-loc mbsc-txt-muted"><span class="mbsc-ic mbsc-ic-location"></span>Office</div><span class="md-event-emoji">💬</span>',
        color: '#f67944',
        category: 'meeting',
        location: 'Office'
    }, {
        start: new Date(now.getFullYear(), now.getMonth(), 8, 13, 0),
        end: new Date(now.getFullYear(), now.getMonth(), 8, 13, 30),
        text: 'Pick up Kate <div class="mbsc-bold md-event-desc">Lunch @ Butcher\'s</div><div class="md-event-loc mbsc-txt-muted"><span class="mbsc-ic mbsc-ic-location"></span>38 Hardman Road, Cedar Court</div><span class="md-event-emoji">🍔</span>',
        color: '#00aabb',
        category: 'date',
        location: '38 Hardman Road, Cedar Court'
    }, {
        start: new Date(now.getFullYear(), 9, 9, 9),
        text: 'Coffee with Steve <div class="md-event-loc mbsc-txt-muted"><span class="mbsc-ic mbsc-ic-location"></span>1334 Rose Street, Walpole</div><span class="md-event-emoji">☕</span>',
        color: '#00aabb',
        category: 'coffee break',
        location: '1334 Rose Street, Walpole'
    }, {
        start: new Date(now.getFullYear(), 10, 2, 12),
        text: 'Trip to England <div class="mbsc-bold md-event-desc">Family visit</div><div class="md-event-loc mbsc-txt-muted"><span class="mbsc-ic mbsc-ic-location"></span>Evergreen Drive</div><span class="md-event-emoji">✈</span>',
        color: '#00aabb',
        category: 'vacation',
        location: 'Evergreen Drive'
    }, {
        start: new Date(now.getFullYear(), 4, 3, 11),
        end: new Date(now.getFullYear(), 4, 3, 12),
        text: 'Photoshoot <div class="md-event-loc mbsc-txt-muted"><span class="mbsc-ic mbsc-ic-location"></span>431 Durham Road, Indianapolis</div><span class="md-event-emoji">📸</span>',
        color: '#00aabb',
        category: 'hobby',
        location: '431 Durham Road, Indianapolis'
    }, {
        start: new Date(now.getFullYear(), now.getMonth(), 17, 30, 0),
        text: 'Shopping with mom <div class="mbsc-bold md-event-desc">List on the fridge</div><div class="md-event-loc mbsc-txt-muted"><span class="mbsc-ic mbsc-ic-location"></span>587 Grant Street, Montpelier</div><span class="md-event-emoji">🛒</span>',
        color: '#f67944',
        category: 'hobby',
        location: '587 Grant Street, Montpelier'
    }, {
        d: (now.getMonth() + 1) + '/14',
        text: 'Dexter BD <div class="md-event-loc mbsc-txt-muted"><span class="mbsc-ic mbsc-ic-location"></span>52 Crescent Street, Phoenix</div><span class="md-event-emoji">🎂</span>',
        color: '#37bbe4',
        category: 'party',
        location: '52 Crescent Street, Phoenix'
    }, {
        d: (now.getMonth() + 1) + '/5',
        text: 'Luke BD <div class="mbsc-bold md-event-desc">Party at 4 PM</div><div class="md-event-loc mbsc-txt-muted"><span class="mbsc-ic mbsc-ic-location"></span>57 Mulberry Street, Fremont</div><span class="md-event-emoji">🎉</span>',
        color: '#37bbe4',
        category: 'birthday',
        location: '57 Mulberry Street, Fremont'
    }, {
        d: 'w3',
        text: 'Employment <div class="mbsc-bold md-event-desc">Semi-weekly</div><div class="md-event-loc mbsc-txt-muted"><span class="mbsc-ic mbsc-ic-location"></span>Office</div><span class="md-event-emoji">✍</span>',
        color: '#635045',
        category: 'meeting',
        location: 'Office'
    }, {
        d: 'w5',
        text: 'Employment <div class="mbsc-bold md-event-desc">Semi-weekly</div><div class="md-event-loc mbsc-txt-muted"><span class="mbsc-ic mbsc-ic-location"></span>Office</div><span class="md-event-emoji">✍</span>',
        color: '#ff9966',
        category: 'meeting',
        location: 'Office'
    }, {
        start: new Date(now.getFullYear(), 1, 7),
        end: new Date(now.getFullYear(), 1, 25),
        text: 'Dean OFF <div class="mbsc-bold md-event-desc">Vacation</div><span class="md-event-emoji">🌄</span>',
        color: '#99ff33',
        category: 'vacation'
    }, {
        start: new Date(now.getFullYear(), 2, 1),
        end: new Date(now.getFullYear(), 2, 14),
        text: 'Mike probation time <div class="mbsc-bold md-event-desc">Jack\'s supervision</div><div class="md-event-loc mbsc-txt-muted"><span class="mbsc-ic mbsc-ic-location"></span>Office</div><span class="md-event-emoji">📋</span>',
        color: '#e7b300',
        category: 'work',
        location: 'Office'
    }, {
        start: new Date(now.getFullYear(), 4, 7),
        end: new Date(now.getFullYear(), 4, 16),
        text: 'John OFF <div class="mbsc-bold md-event-desc">Sick leave</div><span class="md-event-emoji">💊</span>',
        color: '#669900',
        category: 'sickness',
    }, {
        start: new Date(now.getFullYear(), 5, 1),
        end: new Date(now.getFullYear(), 5, 11),
        text: 'Carol OFF <div class="mbsc-bold md-event-desc">Personal problems</div>',
        color: '#6699ff',
        category: 'vacation'
    }, {
        start: new Date(now.getFullYear(), 6, 2),
        end: new Date(now.getFullYear(), 6, 17),
        text: 'Business trip <div class="md-event-loc mbsc-txt-muted"><span class="mbsc-ic mbsc-ic-location"></span>5th Street North</div><span class="md-event-emoji">🚌</span>',
        color: '#cc9900',
        category: 'vacation',
        location: '5th Street North'
    }, {
        start: new Date(now.getFullYear(), 7, 6),
        end: new Date(now.getFullYear(), 7, 14),
        text: 'Ashley OFF <div class="mbsc-bold md-event-desc">On a trip</div><span class="md-event-emoji">🚌</span>',
        color: '#339966',
        category: 'vacation'
    }, {
        start: new Date(now.getFullYear(), 8, 10),
        end: new Date(now.getFullYear(), 8, 20),
        text: 'Marisol OFF <div class="mbsc-bold md-event-desc">Family time</div><span class="md-event-emoji">👨‍‍👧‍👦</span>',
        color: '#8701a9',
        category: 'vacation'
    }, {
        start: new Date(now.getFullYear(), 9, 1),
        end: new Date(now.getFullYear(), 9, 4),
        text: 'Sharon OFF <div class="mbsc-bold md-event-desc">Sick leave</div><span class="md-event-emoji">🤕</span>',
        color: '#cc6699',
        category: 'sickness'
    }, {
        d: '12/25',
        text: 'Christmas Day <div class="md-event-loc mbsc-txt-muted"><span class="mbsc-ic mbsc-ic-location"></span>Home</div><span class="md-event-emoji">🎄</span>',
        color: '#ff0066',
        category: 'holiday',
        location: 'Home'
    }, {
        d: '1/1',
        text: 'New Year\'s day <span class="md-event-emoji">🎆</span>',
        color: '#99ccff',
        category: 'holiday'
    }, {
        d: '4/1',
        text: 'April Fool\'s Day <div class="mbsc-bold md-event-desc">Just kidding!</div><span class="md-event-emoji">🤡</span>',
        color: '#ff6666',
        category: 'joke'
    }, {
        d: '11/2',
        text: 'File Form 720 for the third quarter <span class="md-event-emoji">📃</span>',
        color: '#a63e14',
        category: 'work'
    }]

    eventSettings: MbscEventcalendarOptions = {
        lang: '',
        theme: '',
        display: 'inline',
        view: {
            calendar: { type: 'month' },
            eventList: { type: 'month' }
        },
        cssClass: 'md-custom-data'
    };
}
<mbsc-eventcalendar [data]="events" [options]="eventSettings"></mbsc-eventcalendar>
.md-custom-data .mbsc-event-txt {
    line-height: 1.3em;
}

.md-event-loc {
    padding-top: .5em;
    font-size: 12px;
}

.md-event-emoji {
    position: absolute;
    top: 19px;
    right: 15px;
    font-size: 14px;
}

.md-event-desc+.md-event-loc+.md-event-emoji {
    top: 30px;
}

.md-event-loc .mbsc-ic-location {
    margin-right: 5px;
}

Event Calendar - Date types

Change demo
Date types

The event calendar support multiple data types. The data, marked, colors and labels objects all understand the different formats. Let's see how they look:

  • JS date objects - new Date(1995, 11, 17, 15, 24)
  • ISO date strings - '2008-09-15T15:53:00'
  • Localized date strings - '04/25/2010 8:15 AM'
  • Moment.js objects - moment([2018, 3, 27, 12, 15])
import { ViewChild } from '@angular/core';
import { mobiscroll, MbscEventcalendarOptions, MbscEventcalendar } from '@mobiscroll/angular';
import moment from 'moment';

mobiscroll.settings = {
    lang: '',
    theme: '',
    display: 'inline'
};

@Component({
    selector: 'demo-app',
    templateUrl: './app.component.html'
})
export class AppComponent {
    @ViewChild('mbscDateObj')
    dateObj: MbscEventcalendar;

    @ViewChild('mbscDateStr')
    dateStr: MbscEventcalendar;

    @ViewChild('mbscMoment')
    momentJs: MbscEventcalendar;

    dateObjData: Array < Date > = [];
    dateStrData: Array < string > = [];
    momentJsData: Array < any > = [];

    addDate() {
        this.dateObjData.push({
            start: new Date(2019, 4, 8, 10, 45),
            end: new Date(2019, 4, 8, 11, 45),
            text: 'New Event'
        });

        this.dateObj.instance.navigate(new Date(2019, 4, 8));
    };

    addISO() {
        this.dateStrData.push({
            start: '2019-09-15T15:30:00',
            end: '2019-09-15T16:00:00',
            text: 'New Event'
        });

        this.dateStr.instance.navigate('2019-09-15');
    };

    addMoment() {
        this.momentJsData.push({
            start: moment([2019, 3, 20, 18]),
            end: moment([2019, 3, 20, 20]),
            text: 'New Event'
        });

        this.momentJs.instance.navigate(moment([2019, 3, 20]));
    };
}
<mbsc-form>
    <div class="mbsc-grid">
        <div class="mbsc-row">
            <div class="mbsc-col-sm-12 mbsc-col-md-4">
                <mbsc-form-group>
                    <mbsc-form-group-title>Date object</mbsc-form-group-title>
                    <div class="mbsc-btn-group-block">
                        <mbsc-button (click)="addDate()" class="mbsc-btn-primary">start: new Date(2019, 4, 8, 10, 45) <br /> end: new Date(2019, 4, 8, 11, 45)</mbsc-button>
                    </div>
                    <mbsc-eventcalendar [data]="dateObjData" #mbscDateObj="mobiscroll"></mbsc-eventcalendar>
                </mbsc-form-group>
            </div>
            <div class="mbsc-col-sm-12 mbsc-col-md-4">
                <mbsc-form-group>
                    <mbsc-form-group-title>ISO string</mbsc-form-group-title>
                    <div class="mbsc-btn-group-block">
                        <mbsc-button (click)="addISO()" class="mbsc-btn-primary">start: 2019-09-15T15:30:00 <br /> end: 2019-09-15T16:00:00</mbsc-button>
                    </div>
                    <mbsc-eventcalendar [data]="dateStrData" #mbscDateStr="mobiscroll"></mbsc-eventcalendar>
                </mbsc-form-group>
            </div>
            <div class="mbsc-col-sm-12 mbsc-col-md-4">
                <mbsc-form-group>
                    <mbsc-form-group-title>Moment js</mbsc-form-group-title>
                    <div class="mbsc-btn-group-block">
                        <mbsc-button (click)="addMoment()" class="mbsc-btn-primary">start: moment([2019, 3, 20, 18]) <br /> end: moment([2019, 3, 20, 20])</mbsc-button>
                    </div>
                    <mbsc-eventcalendar [data]="momentJsData" #mbscMoment="mobiscroll"></mbsc-eventcalendar>
                </mbsc-form-group>
            </div>
        </div>
    </div>
</mbsc-form>

Event Calendar - Event data structure

Change demo
Event data structure

The event data structure for is straightforward with a couple of base properties that the component understands and uses to render the UI. Besides the base properties you can add any custom property, like location, description ...

  • text - Defines the event text. This can be plaintext or HTML
  • color - Defines the event color
  • start - Sets the start date and time for the event. It can be a date object, ISO date string or moment.js object
  • end - Sets the end date and time for the event. The same formats are supported as for start

This is how a simple event looks like with a couple of extra properties:

{
    text: 'Product planning',
    color: '#56ca70',
    start: new Date(2018, 11, 21, 13, 00),
    end: new Date(2018, 11, 21, 14, 00),
    busy: true,
    description: 'Weekly meeting with team',
    location: 'Office'
}

import { mobiscroll, MbscEventcalendarOptions } from '@mobiscroll/angular';

mobiscroll.settings = {
    lang: '',
    theme: ''
};

@Component({
    selector: 'demo-app',
    templateUrl: './app.component.html'
})

export class AppComponent {
    text: string = 'Sarah OFF';
    color: string = '#56ca70';
    start: string = new Date(2018, 11, 21, 13, 0);
    end: string = new Date(2018, 11, 21, 14, 0);
    busy: boolean = true;
    desc: string = 'Sick leave';
    loc: string = 'Home';
    events: any = [];

    settings = {
        display: 'inline'
    };

    addEvent() {
        this.events.push({
            text: this.text,
            color: this.color,
            start: this.start,
            end: this.end,
            busy: this.busy,
            description: this.desc,
            location: this.loc
        });
    };

    settings: MbscEventcalendarOptions = {
        display: 'inline'
    };
}
<mbsc-form>
    <div class="mbsc-grid">
        <div class="mbsc-row mbsc-justify-content-center">
            <div class="mbsc-col-sm-12 mbsc-col-md-5">
                <mbsc-form-group>
                    <mbsc-form-group-title>Base properties</mbsc-form-group-title>
                    <mbsc-input [(ngModel)]="text" disabled>Text</mbsc-input>
                    <mbsc-input [(ngModel)]="color" disabled>Color</mbsc-input>
                    <mbsc-input [(ngModel)]="start" disabled>Start</mbsc-input>
                    <mbsc-input [(ngModel)]="end" disabled>End</mbsc-input>
                </mbsc-form-group>
                <mbsc-form-group>
                    <mbsc-form-group-title>Add any property you'd like</mbsc-form-group-title>
                    <mbsc-input [(ngModel)]="busy" disabled>Busy</mbsc-input>
                    <mbsc-input [(ngModel)]="desc" disabled>Description</mbsc-input>
                    <mbsc-input [(ngModel)]="loc" disabled>Location</mbsc-input>
                </mbsc-form-group>
                <mbsc-button (click)="addEvent()">Add event</mbsc-button>
            </div>
            <div class="mbsc-col-sm-12 mbsc-col-md-5">
                <mbsc-form-group>
                    <mbsc-form-group-title>Event calendar</mbsc-form-group-title>
                    <mbsc-eventcalendar [data]="events" [options]="settings"></mbsc-eventcalendar>
                </mbsc-form-group>
            </div>
        </div>
    </div>
</mbsc-form>

Event Calendar - Events from remote API

Change demo
Events from remote API
Angular Event calendar demo with data loading from remote API. Load and populate with events coming from external JSON. For Angular 2/4/5/6/7 and Ionic 2/3/4.
import {  MbscEventcalendarOptions } from '@mobiscroll/angular';
import { Jsonp } from '@angular/http';

@Component({
    selector: 'demo-app',
    templateUrl: './app.component.html'
})
export class AppComponent {

    constructor(private jsonp: Jsonp) {}

    events: any;

    ngOnInit() {
        this.jsonp.request('https://trial.mobiscroll.com/events/?callback=JSONP_CALLBACK').subscribe((res: any) => {
            this.events = res._body;
        });
    }

    eventSettings: MbscEventcalendarOptions = {
        lang: '',
        theme: '',
        display: 'inline',
        view: {
            calendar: { type: 'month' },
            eventList: { type: 'month' }
        }
    };
}
<mbsc-eventcalendar [data]="events" [options]="eventSettings"></mbsc-eventcalendar>

Event Calendar - Loading events on demand

Change demo
Loading events on demand
Angular Event calendar demo with dynamic data. Load events on demand with month change from external JSON API. For Angular 2/4/5/6/7 and Ionic 2/3/4.
import { NgZone } from '@angular/core';
import { mobiscroll, MbscEventcalendarOptions } from '@mobiscroll/angular';

@Component({
    selector: 'demo-app',
    templateUrl: './app.component.html'
})
export class AppComponent {
    events = [];

    constructor(private _ngZone: NgZone) {}

    eventSettings: MbscEventcalendarOptions = {
        lang: '',
        theme: '',
        display: 'inline',
        view: {
            calendar: { type: 'month' },
            eventList: { type: 'month' }
        },
        onPageLoading: (event, inst) => {
            var year = event.firstDay.getFullYear(),
                month = event.firstDay.getMonth();

            // mobiscroll.util.getJson is for demonstration purposes only, use the Angular's JsonpModule or other Angular method instead in you implementation
            mobiscroll.util.getJson('https://trial.mobiscroll.com/monthlyevents/?year=' + year + '&month=' + month, (data) => {
                this._ngZone.run(() => {
                    for (var i = 0; i < data.length; i++) {
                        this.events.push({
                            start: data[i].start,
                            end: data[i].end,
                            d: data[i].d,
                            text: data[i].text,
                            color: data[i].color
                        });
                    }
                });
            }, 'jsonp');

        }
    };
}
<mbsc-eventcalendar [data]="events" [options]="eventSettings"></mbsc-eventcalendar>

Event Calendar - Custom data binding

Change demo
Custom data binding
Angular Event calendar demo for syncing google and facebook calendar data. Demonstrates flexible data source and API. For Angular 2/4/5/6/7 and Ionic 2/3/4.
// Code not available for Angular
<!-- Code not available for Angular -->
/* Code not available for Angular */

Event Calendar - Add/delete event

Change demo
Add/delete event

The component renders event data that it gets from an API, however you can manually add and delete events in real time. The idea is to pass the event in the correct format, which means it needs a couple of base properties:

  • d or start & end - Defines the date and length of the event
  • text - Defines the lable for the event, which can be anythng from text to something more complex like HTML
  • color - Defines the color of the event
  • allDay - Sets if the event is an all-day event or not
  • everything else you would like - You can add any additional data that makes sense, like busy or location...

After you have the data object ready with the event data you can pass it to the addEvent method. While the event calendar doesn't ship with a built-in form for adding events, you can use the popup component along with inputs & fields to build the form you need.

Deleting events can be done just as simply by calling the removeEvent method

import { ViewChild } from '@angular/core';
import { mobiscroll, MbscEventcalendarOptions, MbscRangeOptions, MbscFormOptions, MbscRange, MbscEventcalendar, MbscPopupOptions } from '@mobiscroll/angular';

mobiscroll.settings = {
    lang: '',
    theme: ''
};

let preventSet,
    now = new Date(),
    btn = '<button class="mbsc-btn mbsc-btn-outline mbsc-btn-danger md-delete-btn">Delete</button>',
    id = 3;

@Component({
    selector: 'demo-app',
    templateUrl: './app.component.html'
})
export class AppComponent {
    @ViewChild('mbscRange')
    range: MbscRange;

    @ViewChild('mbscMonthCal')
    monthCal: MbscEventcalendar;

    @ViewChild('mbscDayCal')
    dayCal: MbscEventcalendar;

    allDay: boolean = false;
    eventDate: Array < Date > = [now, new Date(now.getFullYear(), now.getMonth(), now.getDate(), now.getHours() + 2)];
    isFree: string = 'false';
    eventText: string = '';
    events: Array < any > = [{
        id: 1,
        start: new Date(now.getFullYear(), now.getMonth(), 8, 13, 0),
        end: new Date(now.getFullYear(), now.getMonth(), 8, 13, 30),
        text: 'Lunch @ Butcher\'s' + btn,
        color: '#26c57d'
    }, {
        id: 2,
        start: new Date(now.getFullYear(), now.getMonth(), now.getDate(), 15, 0),
        end: new Date(now.getFullYear(), now.getMonth(), now.getDate(), 16, 0),
        text: 'General orientation' + btn,
        color: '#fd966a'
    }];

    navigate(inst, val) {
        if (inst) {
            inst.navigate(val);
        }
    };

    rangeSettings: MbscRangeOptions = {
        controls: ['date', 'time'],
        dateWheels: '|D M d|',
        startInput: '#startDate',
        endInput: '#endDate',
        tabs: false,
        responsive: {
            large: {
                touchUi: false
            }
        },
            showSelector: false
    };

    daySettings: MbscEventcalendarOptions = {
        display: 'inline',
        view: {
            eventList: { type: 'day' }
        },
        onPageChange: (event, inst) => {
            var day = event.firstDay;
            preventSet = true;
            this.navigate(this.monthCal.instance, day);
            this.eventDate = [day, new Date(day.getFullYear(), day.getMonth(), day.getDate(), day.getHours() + 2)];
        },
        onEventSelect: (event, inst) => {
            if (event.domEvent.target.classList.contains('md-delete-btn')) {
                mobiscroll.confirm({
                    title: 'Confirm Deletion',
                    message: 'Are you sure you want to delete this item?',
                    okText: 'Delete',
                    callback: (res) => {
                        if (res) {
                            //remove element by id
                            var events = this.events,
                                index = events.indexOf(events.filter(x => x.id == event.event.id)[0]);

                            events.splice(index, 1);

                            mobiscroll.toast({
                                message: 'Deleted'
                            });
                        }
                    }
                });
            }
        }
    };

    monthSettings: MbscEventcalendarOptions = {
        display: 'inline',
        view: {
            calendar: { type: 'month' }
        },
        onSetDate: (event, inst) => {
            if (!preventSet) {
                var day = event.date;
                this.navigate(this.dayCal.instance, day);
                this.eventDate = [day, new Date(day.getFullYear(), day.getMonth(), day.getDate(), day.getHours() + 2)];
            }
            preventSet = false;
        }
    };

    popupSettings: MbscPopupOptions = {
        display: 'center',
        cssClass: 'mbsc-no-padding',
        buttons: [{
                text: 'Add event',
                handler: 'set'
            },
            'cancel'
        ],
        headerText: 'Add new event',
        onSet: (event, inst) => {
            this.events.push({
                id: id,
                start: this.eventDate[0],
                end: this.eventDate[1],
                text: (this.eventText || 'New Event') + btn,
                title: this.eventText || 'New Event',
                description: this.eventDesc,
                allDay: this.allDay,
                free: this.isFree == 'true'
            });
            this.eventText = '';
            this.eventDesc = '';
            id += 1;
            // Navigate the calendar to the new event's start date
            this.monthCal.instance.navigate(this.eventDate[0], true);
        }
    };

    change() {
        this.range.instance.option({
            controls: this.allDay ? ['date'] : ['date', 'time'],
            dateWheels: this.allDay ? 'MM dd yy' : '|D M d|'
        });
    }
}
<mbsc-form [options]="formSettings">
    <div class="mbsc-grid md-add-event-demo">
        <div class="mbsc-row mbsc-no-padding">
            <div class="mbsc-col-md-4 mbsc-col-12">
                <mbsc-eventcalendar [data]="events" [options]="monthSettings" #mbscMonthCal="mobiscroll"></mbsc-eventcalendar>
                <div class="mbsc-btn-group-block">
                    <mbsc-button (click)="mbscPopup.instance.show()">Add Event</mbsc-button>
                </div>
            </div>
            <div class="mbsc-col-md-8 mbsc-col-12 md-col-right">
                <mbsc-eventcalendar [data]="events" [options]="daySettings" #mbscDayCal="mobiscroll"></mbsc-eventcalendar>
            </div>
        </div>
    </div>
</mbsc-form>

<mbsc-popup [options]="popupSettings" #mbscPopup="mobiscroll" class="md-add-event-popup">
    <mbsc-form>
        <mbsc-form-group>
            <mbsc-input [(ngModel)]="eventText">Title</mbsc-input>
            <mbsc-textarea [(ngModel)]="eventDesc">Description</mbsc-textarea>
        </mbsc-form-group>
        <mbsc-form-group>
            <mbsc-switch [(ngModel)]="allDay" (change)="change()">All-day</mbsc-switch>
            <mbsc-range [(ngModel)]="eventDate" [options]="rangeSettings" #mbscRange="mobiscroll">
                <mbsc-range-start>Starts</mbsc-range-start>
                <mbsc-range-end>Ends</mbsc-range-end>
            </mbsc-range>
            <mbsc-segmented-group name="my-group" [(ngModel)]="isFree">
                <mbsc-segmented value="false">Show as busy</mbsc-segmented>
                <mbsc-segmented value="true">Show as free</mbsc-segmented>
            </mbsc-segmented-group>
        </mbsc-form-group>
    </mbsc-form>
</mbsc-popup>
.md-add-event-demo {
    position: absolute;
    height: 100%;
}

.md-add-event-demo .mbsc-row {
    height: 100%;
}

.md-add-event-demo .md-col-right {
    overflow: auto;
    height: 100%;
    border-left: 1px solid #ccc;
}

.md-add-event-demo .md-delete-btn {
    margin: 0;
    position: absolute;
    right: 10px;
    z-index: 1;
    transition: background-color .3s ease-out;
}

.md-add-event-demo .md-delete-btn.mbsc-btn-outline.mbsc-btn:not(:disabled):not(.mbsc-active):hover:hover {
    background: #f5504e;
    color: #fff;
}

.mbsc-rtl .md-add-event-demo .md-delete-btn {
    right: auto;
    left: 10px;
}

.md-add-event-popup {
    max-width: 400px;
}

Event Calendar - View/update event

Change demo
View/update event
import { ViewChild } from '@angular/core';
import { mobiscroll, MbscEventcalendarOptions, MbscRangeOptions, MbscFormOptions, MbscPopupOptions, MbscColorOptions, MbscRange, MbscEventcalendar, MbscPopup } from '@mobiscroll/angular';
import { Jsonp } from '@angular/http';

mobiscroll.settings = {
    lang: '',
    theme: ''
};

let preventSet,
    eventToEdit;

@Component({
    selector: 'demo-app',
    templateUrl: './app.component.html'
})
export class AppComponent {
    constructor(private jsonp: Jsonp) {}

    events: Array < any > ;
    eventText: string;
    eventDesc: string;
    allDay: boolean;
    eventStart: Date;
    eventEnd: Date;
    isFree: string;
    eventColor: string;

    ngOnInit() {
        this.jsonp.request('https://trial.mobiscroll.com/events-update/?callback=JSONP_CALLBACK').subscribe((res: any) => {
            this.events = res._body;
        });
    }

    @ViewChild('mbscRange')
    range: MbscRange;

    @ViewChild('mbscCal')
    cal: MbscEventcalendar;

    @ViewChild('mbscList')
    list: MbscEventcalendar;

    @ViewChild('mbscPopup')
    popup: MbscPopup;

    navigate(inst, val) {
        if (inst) {
            inst.navigate(val);
        }
    };

    rangeSettings: MbscRangeOptions = {
        controls: ['date', 'time'],
        dateWheels: '|D M d|',
        tabs: false,
        responsive: {
            large: {
                touchUi: false
            }
        }
    };

    listSettings: MbscEventcalendarOptions = {
        display: 'inline',
        view: {
            eventList: { type: 'day' }
        },
        onPageChange: (event, inst) => {
            var day = event.firstDay;
            preventSet = true;
            this.navigate(this.cal.instance, day);
        },
        onEventSelect: (event, inst) => {
            eventToEdit = event.event;
            this.updatePopup();
            this.popup.instance.show();
        }
    };

    calSettings: MbscEventcalendarOptions = {
        display: 'inline',
        view: {
            calendar: { type: 'month' }
        },
        onSetDate: (event, inst) => {
            if (!preventSet) {
                var day = event.date;
                this.navigate(this.list.instance, day);
            }
            preventSet = false;
        }
    };

    colorSettings: MbscColorOptions = {
        display: 'inline',
        clear: false,
        data: ['#fff568', '#ffc400', '#ff5252', '#f48fb1', '#ba68c8', '#8c9eff', '#90caf9', '#9ccc65', '#0db057', '#bcaaa4']
    };

    popupSettings: MbscPopupOptions = {
        display: 'center',
        buttons: [
            'cancel',
            {
                text: 'Save',
                handler: 'set'
            }
        ],
        headerText: 'Edit event',
        onSet: (event, inst) => {
            this.saveChanges();
        }
    };

    change() {
        this.range.instance.option({
            controls: this.allDay ? ['date'] : ['date', 'time'],
            dateWheels: this.allDay ? 'MM dd yy' : '|D M d|'
        });
    }

    saveChanges() {
        var eventToSave = {
                id: eventToEdit.id,
                text: this.eventText,
                desc: this.eventDesc,
                color: this.eventColor,
                allDay: this.allDay,
                start: this.eventStart,
                end: this.eventEnd,
                free: this.isFree == 'true'
            },
            index = this.events.indexOf(this.events.filter(x => x.id === eventToEdit.id)[0]);

        this.events[index] = eventToSave;
    }

    updatePopup() {
        var event = eventToEdit,
            free = event.free ? 'true' : 'false',
            oneDay = 1000 * 60 * 60 * 24,
            diff = new Date(event.end).getTime() - new Date(event.start).getTime(),
            days = Math.round(Math.abs(diff) / oneDay),
            allDay = event.allDay || days > 0;

        this.eventText = event.text || '';
        this.eventDesc = event.desc || '';
        this.allDay = allDay;
        
        setTimeout(() => {
            this.eventStart = event.start;
            this.eventEnd = event.end;
        });
        
        this.isFree = free;
        this.eventColor = event.color;
        
        this.range.instance.option({
            controls: this.allDay ? ['date'] : ['date', 'time'],
            dateWheels: this.allDay ? 'MM dd yy' : '|D M d|'
        });
    }
}
<mbsc-form>
    <div class="mbsc-grid md-view-update-demo">
        <div class="mbsc-row mbsc-no-padding">
            <div class="mbsc-col-md-4 mbsc-col-12">
                <div id="demo-view-update-event"></div>
                <mbsc-eventcalendar [data]="events" [options]="calSettings" #mbscCal="mobiscroll"></mbsc-eventcalendar>
            </div>
            <div class="mbsc-col-md-8 mbsc-col-12 md-col-right">
                <mbsc-eventcalendar [data]="events" [options]="listSettings" #mbscList="mobiscroll"></mbsc-eventcalendar>
            </div>
        </div>
    </div>
</mbsc-form>

<mbsc-popup [options]="popupSettings" #mbscPopup="mobiscroll" class="md-view-update-popup">
    <mbsc-form>
        <mbsc-form-group>
            <mbsc-input [(ngModel)]="eventText">Title</mbsc-input>
            <mbsc-textarea [(ngModel)]="eventDesc">Description</mbsc-textarea>
        </mbsc-form-group>
        <mbsc-form-group>
            <mbsc-switch [(ngModel)]="allDay" (change)="change()">All-day</mbsc-switch>
            <mbsc-range [options]="rangeSettings" #mbscRange="mobiscroll">
                <mbsc-range-start [(ngModel)]="eventStart">Starts</mbsc-range-start>
                <mbsc-range-end [(ngModel)]="eventEnd">Ends</mbsc-range-end>
            </mbsc-range>
            <mbsc-segmented-group name="free" [(ngModel)]="isFree">
                <mbsc-segmented value="false">Show as busy</mbsc-segmented>
                <mbsc-segmented value="true">Show as free</mbsc-segmented>
            </mbsc-segmented-group>
            <mbsc-color [(ngModel)]="eventColor" [options]="colorSettings"></mbsc-color>
        </mbsc-form-group>
    </mbsc-form>
</mbsc-popup>
.md-view-update-demo {
    position: absolute;
    height: 100%;
}

.md-view-update-demo .mbsc-row {
    height: 100%;
}

.md-view-update-demo .md-col-right {
    overflow: auto;
    height: 100%;
    border-left: 1px solid #ccc;
}

.md-view-update-popup {
    max-width: 400px;
}

.md-hidden .mbsc-color-input {
    display: none;
}

Event Calendar - Calendar systems

Change demo
Calendar systems
Angular Event calendar with Gregorian, Hijri and Jalali system supporting different language and culture settings. For Angular 2/4/5/6/7 and Ionic 2/3/4.
import { mobiscroll, MbscEventcalendarOptions } from '@mobiscroll/angular';
import { Jsonp } from '@angular/http';

mobiscroll.settings = {
    lang: '',
    theme: ''
};

@Component({
    selector: 'demo-app',
    templateUrl: './app.component.html'
})

export class AppComponent {
    constructor(private jsonp: Jsonp) {}

    events: any;

    ngOnInit() {
        this.jsonp.request('https://trial.mobiscroll.com/events/?callback=JSONP_CALLBACK').subscribe((res: any) => {
            this.events = res._body;
        });
    }

    gregorianSettings: MbscEventcalendarOptions = {
        display: 'inline',
        calendarSystem: 'gregorian'
    };

    jalaliSettings: MbscEventcalendarOptions = {
        display: 'inline',
        calendarSystem: 'jalali',
        lang: 'fa'
    };

    hijriSettings: MbscEventcalendarOptions = {
        display: 'inline',
        calendarSystem: 'hijri',
        lang: 'ar'
    };
}
<mbsc-form>
    <div class="mbsc-grid">
        <div class="mbsc-row">
            <div class="mbsc-col-sm-12 mbsc-col-md-4">
                <div class="mbsc-form-group">
                    <div class="mbsc-form-group-title">Gregorian calendar</div>
                    <mbsc-eventcalendar [data]="events" [options]="gregorianSettings"></mbsc-eventcalendar>
                </div>
            </div>
            <div class="mbsc-col-sm-12 mbsc-col-md-4">
                <div class="mbsc-form-group">
                    <div class="mbsc-form-group-title">Jalali calendar</div>
                    <mbsc-eventcalendar [data]="events" [options]="jalaliSettings"></mbsc-eventcalendar>
                </div>
            </div>
            <div class="mbsc-col-sm-12 mbsc-col-md-4">
                <div class="mbsc-form-group">
                    <div class="mbsc-form-group-title">Hijri calendar</div>
                    <mbsc-eventcalendar [data]="events" [options]="hijriSettings"></mbsc-eventcalendar>
                </div>
            </div>
        </div>
    </div>
</mbsc-form>

Event Calendar - Event handlers

Change demo
Event handlers
Angular Event calendar for mobile and desktop with hooks for custom integration and functionality. With source code. For Angular 2/4/5/6/7 and Ionic 2/3/4.
Clear event log
EVENTS FIRED: 
import { MbscEventcalendarOptions } from '@mobiscroll/angular';

let now = new Date();

@Component({
    selector: 'demo-app',
    templateUrl: './app.component.html'
})
export class AppComponent {
    events: Array < any > = [{
        d: now,
        text: 'Green box to post office',
        color: '#6e7f29'
    }, {
        d: 'w3',
        text: 'Employment (Semi-weekly)',
        color: '#635045'
    }, {
        d: 'w5',
        text: 'Employment (Semi-weekly)',
        color: '#ff9966'
    }, {
        start: new Date(now.getFullYear(), 1, 7),
        end: new Date(now.getFullYear(), 1, 25),
        text: 'Dean OFF',
        color: '#99ff33'
    }, {
        start: new Date(now.getFullYear(), 2, 5),
        end: new Date(now.getFullYear(), 2, 14),
        text: 'Mike OFF',
        color: '#e7b300'
    }, {
        start: new Date(now.getFullYear(), 4, 7),
        end: new Date(now.getFullYear(), 4, 16),
        text: 'John OFF',
        color: '#669900'
    }, {
        start: new Date(now.getFullYear(), 5, 1),
        end: new Date(now.getFullYear(), 5, 11),
        text: 'Carol OFF',
        color: '#6699ff'
    }, {
        start: new Date(now.getFullYear(), 6, 2),
        end: new Date(now.getFullYear(), 6, 17),
        text: 'Jason OFF',
        color: '#cc9900'
    }, {
        start: new Date(now.getFullYear(), 7, 6),
        end: new Date(now.getFullYear(), 7, 14),
        text: 'Ashley OFF',
        color: '#339966'
    }, {
        start: new Date(now.getFullYear(), 8, 10),
        end: new Date(now.getFullYear(), 8, 20),
        text: 'Marisol OFF',
        color: '#8701a9'
    }, {
        start: new Date(now.getFullYear(), 9, 1),
        end: new Date(now.getFullYear(), 9, 12),
        text: 'Sharon OFF',
        color: '#cc6699'
    }, {
        d: '12/25',
        text: 'Christmas Day',
        color: '#ff0066'
    }, {
        d: '1/1',
        text: 'New Year\'s day',
        color: '#99ccff'
    }, {
        d: '4/1',
        text: 'April Fool\'s Day',
        color: '#ff6666'
    }];

    eventSettings: MbscEventcalendarOptions = {
        lang: '',
        theme: '',
        display: 'inline',
        view: {
            calendar: { type: 'month' },
            eventList: { type: 'month' }
        },
        onInit: (event, inst) => {
            // Your custom event handler goes here
        },
        onMarkupReady: (event, inst) => {
            // Your custom event handler goes here
        },
        onBeforeShow: (event, inst) => {
            // Your custom event handler goes here
        },
        onPosition: (event, inst) => {
            // Your custom event handler goes here
        },
        onShow: (event, inst) => {
            // Your custom event handler goes here
        },
        onDestroy: (event, inst) => {
            // Your custom event handler goes here
        },
        onClose: (event, inst) => {
            // Your custom event handler goes here
        },
        onBeforeClose: (event, inst) => {
            // Your custom event handler goes here
        },
        onPageLoading: (event, inst) => {
            // Your custom event handler goes here
        },
        onPageLoaded: (event, inst) => {
            // Your custom event handler goes here
        },
        onPageChange: (event, inst) => {
            // Your custom event handler goes here
        },
        onEventSelect: (event, inst) => {
            // Your custom event handler goes here
        },
        onDayChange: (event, inst) => {
            // Your custom event handler goes here
        },
        onLabelTap: (event, inst) => {
            // Your custom event handler goes here
        },
        onSetDate: (event, inst) => {
            // Your custom event handler goes here
        }
    };
}
<mbsc-eventcalendar [data]="events" [options]="eventSettings"></mbsc-eventcalendar>

Event Calendar - Localization

Change demo
Localization
Angular Event calendar localization example supporting 37 languages, date, time formats with full RTL capability. For Angular 2/4/5/6/7 and Ionic 2/3/4.
import { ViewChild } from '@angular/core';
import { mobiscroll, MbscEventcalendarOptions, MbscSelectOptions, MbscEventcalendar } from '@mobiscroll/angular';
import { Jsonp } from '@angular/http';

mobiscroll.settings = {
    lang: '',
    theme: ''
};

@Component({
    selector: 'demo-app',
    templateUrl: './app.component.html'
})

export class AppComponent {
    constructor(private jsonp: Jsonp) {}
    @ViewChild('cal')
    calendar: MbscEventcalendar;

    events: any;

    ngOnInit() {
        this.jsonp.request('https://trial.mobiscroll.com/events/?callback=JSONP_CALLBACK').subscribe((res: any) => {
            this.events = res._body;
        });
    }

    lang: string = 'en';
    flagClass: string = 'flag-en';

    languages: any = [{
        value: 'en',
        text: 'English'
    }, {
        value: 'ar',
        text: 'Arabic'
    }, {
        value: 'bg',
        text: 'Bulgarian'
    }, {
        value: 'ca',
        text: 'Català'
    }, {
        value: 'cs',
        text: 'Cestina'
    }, {
        value: 'zh',
        text: 'Chinese'
    }, {
        value: 'hr',
        text: 'Croatian'
    }, {
        value: 'da',
        text: 'Dansk'
    }, {
        value: 'de',
        text: 'Deutsch'
    }, {
        value: 'en-UK',
        text: 'English (UK)'
    }, {
        value: 'es',
        text: 'Español'
    }, {
        value: 'fr',
        text: 'Français'
    }, {
        value: 'el',
        text: 'Greek'
    }, {
        value: 'in',
        text: 'Hindi'
    }, {
        value: 'it',
        text: 'Italiano'
    }, {
        value: 'ja',
        text: 'Japanese'
    }, {
        value: 'ko',
        text: 'Korean'
    }, {
        value: 'lt',
        text: 'Lietuvių'
    }, {
        value: 'hu',
        text: 'Magyar'
    }, {
        value: 'nl',
        text: 'Nederlands'
    }, {
        value: 'no',
        text: 'Norsk'
    }, {
        value: 'pl',
        text: 'Polski'
    }, {
        value: 'pt-PT',
        text: 'Português Europeu'
    }, {
        value: 'pt-BR',
        text: 'Pt. Brasileiro'
    }, {
        value: 'ro',
        text: 'Româna'
    }, {
        value: 'sr',
        text: 'Serbian'
    }, {
        value: 'sk',
        text: 'Slovencina'
    }, {
        value: 'fi',
        text: 'Suomi'
    }, {
        value: 'sv',
        text: 'Svenska'
    }, {
        value: 'th',
        text: 'Thai'
    }, {
        value: 'tr',
        text: 'Türkçe'
    }, {
        value: 'ua',
        text: 'Ukrainian'
    }, {
        value: 'vi',
        text: 'Vietnamese'
    }, {
        value: 'ru',
        text: 'Русский'
    }, {
        value: 'ru-UA',
        text: 'Русский (UA)'
    }, {
        value: 'he',
        text: 'עברית'
    }, {
        value: 'fa',
        text: 'فارسی'
    }];

    selectSettings: MbscSelectOptions = {
        display: 'bubble',
        touchUi: false,
        onSet: (event, inst) => {
            let la = inst.getVal();

            this.calendar.instance.option({
                lang: la
            });

            this.flagClass = 'flag-' + la;
        }
    };

    calSettings: MbscEventcalendarOptions = {
        display: 'inline'
    };
}
<mbsc-form class="md-localization" input-style="box" label-style="inline">
    <div class="mbsc-grid">
        <div class="mbsc-row mbsc-justify-content-center">
            <div class="mbsc-col-sm-7 mbsc-col-md-5 mbsc-col-lg-4">
                <mbsc-select [(ngModel)]="lang" [options]="selectSettings" [data]="languages">
                    <span class="flag" [ngClass]="flagClass"></span>
                </mbsc-select>
            </div>
        </div>
        <div class="mbsc-row mbsc-justify-content-center">
            <div class="mbsc-col-sm-9 mbsc-col-md-7 mbsc-col-lg-6">
                <mbsc-eventcalendar [data]="events" [options]="calSettings" #cal="mobiscroll"></mbsc-eventcalendar>
            </div>
        </div>
    </div>
</mbsc-form>
.md-localization span.flag {
    min-width: 22px;
    height: 15px;
    position: relative;
    left: 0;
    margin-right: 1em;
    z-index: 1;
    top: 10px;
}

.mbsc-rtl .md-localization span.flag {
    margin-right: 0;
    margin-left: 1em;
}

.mbsc-ios .md-localization span.flag {
    top: 15px;
    left: 1em;
}

.mbsc-rtl.mbsc-ios .md-localization span.flag {
    right: 1em;
}

.mbsc-windows .md-localization span.flag {
    top: 8px;
}

.md-localization img.flag {
    width: 30px;
}

.md-localization .flag {
    background: url(https://img.mobiscroll.com/demos/flags/flags_responsive.png) no-repeat;
    background-size: 100%;
}

.md-localization .flag-en {
    background-position: 0 93.38843%;
}

.md-localization .flag-ar {
    background-position: 0 76.033058%;
}

.md-localization .flag-bg {
    background-position: 0 9.090909%;
}

.md-localization .flag-ca {
    background-position: 0 14.876033%;
}

.md-localization .flag-cs {
    background-position: 0 21.900826%;
}

.md-localization .flag-zh {
    background-position: 0 19.008264%;
}

.md-localization .flag-hr {
    background-position: 0 38.429752%;
}

.md-localization .flag-da {
    background-position: 0 23.140496%;
}

.md-localization .flag-de {
    background-position: 0 22.31405%;
}

.md-localization .flag-en-UK {
    background-position: 0 92.561983%;
}

.md-localization .flag-es {
    background-position: 0 26.859504%;
}

.md-localization .flag-fr {
    background-position: 0 29.752066%;
}

.md-localization .flag-el {
    background-position: 0 34.710744%;
}

.md-localization .flag-in {
    background-position: 0 40.909091%;
}

.md-localization .flag-it {
    background-position: 0 42.975207%;
}

.md-localization .flag-ja {
    background-position: 0 44.214876%;
}

.md-localization .flag-ko {
    background-position: 0 47.520661%;
}

.md-localization .flag-lt {
    background-position: 0 52.066116%;
}

.md-localization .flag-hu {
    background-position: 0 39.256198%;
}

.md-localization .flag-nl {
    background-position: 0 65.289256%;
}

.md-localization .flag-no {
    background-position: 0 65.702479%;
}

.md-localization .flag-pl {
    background-position: 0 70.661157%;
}

.md-localization .flag-pt-PT {
    background-position: 0 72.31405%;
}

.md-localization .flag-pt-BR {
    background-position: 0 11.983471%;
}

.md-localization .flag-ro {
    background-position: 0 74.380165%;
}

.md-localization .flag-sr {
    background-position: 0 74.793388%;
}

.md-localization .flag-sk {
    background-position: 0 79.752066%;
}

.md-localization .flag-fi {
    background-position: 0 27.68595%;
}

.md-localization .flag-sv {
    background-position: 0 77.68595%;
}

.md-localization .flag-th {
    background-position: 0 85.950413%;
}

.md-localization .flag-tr {
    background-position: 0 89.256198%;
}

.md-localization .flag-ua {
    background-position: 0 91.735537%;
}

.md-localization .flag-vi {
    background-position: 0 96.694215%;
}

.md-localization .flag-ru {
    background-position: 0 75.206612%;
}

.md-localization .flag-ru-UA {
    background-position: 0 10.743802%;
}

.md-localization .flag-he {
    background-position: 0 40.495868%;
}

.md-localization .flag-fa {
    background-position: 0 42.14876%;
}

Event Calendar - Theming capabilities

Change demo
Theming capabilities
import { ViewChild } from '@angular/core';
import { mobiscroll, MbscCalendar, MbscEventcalendarOptions } from '@mobiscroll/angular';
import { Jsonp } from '@angular/http';

mobiscroll.settings = {
    lang: '',
    theme: ''
};

@Component({
    selector: 'demo-app',
    templateUrl: './app.component.html'
})
export class AppComponent {
    constructor(private jsonp: Jsonp) {}

    @ViewChild('mbscCalIos')
    iosCal: MbscCalendar;

    @ViewChild('mbscCalMaterial')
    materialCal: MbscCalendar;

    @ViewChild('mbscCalWindows')
    windowsCal: MbscCalendar;

    @ViewChild('mbscCalMobiscroll')
    mobiscrollCal: MbscCalendar;

    events: Array < any > ;
    ios: string = 'ios';
    material: string = 'material';
    windows: string = 'windows';
    mobiscroll: string = 'mobiscroll';

    ngOnInit() {
        this.jsonp.request('https://trial.mobiscroll.com/events/?callback=JSONP_CALLBACK').subscribe((res: any) => {
            this.events = res._body;
        });
    }

    iosSettings: MbscEventcalendarOptions = {
        theme: 'ios',
        display: 'inline',
        view: {
            calendar: {
                labels: true
            }
        }
    };

    materialSettings: MbscEventcalendarOptions = {
        theme: 'material',
        display: 'inline',
        view: {
            calendar: {
                labels: true
            }
        }
    };

    windowsSettings: MbscEventcalendarOptions = {
        theme: 'windows',
        display: 'inline',
        view: {
            calendar: {
                labels: true
            }
        }
    };

    mobiscrollSettings: MbscEventcalendarOptions = {
        theme: 'mobiscroll',
        display: 'inline',
        view: {
            calendar: {
                labels: true
            }
        }
    };

    changeIos() {
        this.iosCal.instance.option({ theme: this.ios });
    }

    changeMaterial() {
        this.materialCal.instance.option({ theme: this.material });
    }

    changeWindows() {
        this.windowsCal.instance.option({ theme: this.windows });
    }

    changeMobiscroll() {
        this.mobiscrollCal.instance.option({ theme: this.mobiscroll });
    }
}
<div class="mbsc-grid mbsc-grid-fixed">
    <div class="mbsc-row">
        <mbsc-form-group class="mbsc-col-sm-12 mbsc-col-md-6">
            <mbsc-form>
                <mbsc-form-group-title>iOS Theme</mbsc-form-group-title>
                <mbsc-segmented-group [(ngModel)]="ios" (change)="changeIos()">
                    <mbsc-segmented value="ios">Light</mbsc-segmented>
                    <mbsc-segmented value="ios-dark">Dark</mbsc-segmented>
                    <mbsc-segmented value="ios-gray">Custom</mbsc-segmented>
                </mbsc-segmented-group>
            </mbsc-form>
            <mbsc-eventcalendar [data]="events" [options]="iosSettings" #mbscCalIos="mobiscroll"></mbsc-eventcalendar>
        </mbsc-form-group>
        <mbsc-form-group class="mbsc-col-sm-12 mbsc-col-md-6">
            <mbsc-form>
                <mbsc-form-group-title>Material Theme</mbsc-form-group-title>
                <mbsc-segmented-group [(ngModel)]="material" (change)="changeMaterial()">
                    <mbsc-segmented value="material">Light</mbsc-segmented>
                    <mbsc-segmented value="material-dark">Dark</mbsc-segmented>
                    <mbsc-segmented value="material-indigo">Custom</mbsc-segmented>
                </mbsc-segmented-group>
            </mbsc-form>
            <mbsc-eventcalendar [data]="events" [options]="materialSettings" #mbscCalMaterial="mobiscroll"></mbsc-eventcalendar>
        </mbsc-form-group>
    </div>
    <div class="mbsc-row">
        <mbsc-form-group class="mbsc-col-sm-12 mbsc-col-md-6">
            <mbsc-form>
                <mbsc-form-group-title>Windows Theme</mbsc-form-group-title>
                <mbsc-segmented-group [(ngModel)]="windows" (change)="changeWindows()">
                    <mbsc-segmented value="windows">Light</mbsc-segmented>
                    <mbsc-segmented value="windows-dark">Dark</mbsc-segmented>
                    <mbsc-segmented value="windows-yellow">Custom</mbsc-segmented>
                </mbsc-segmented-group>
            </mbsc-form>
            <mbsc-eventcalendar [data]="events" [options]="windowsSettings" #mbscCalWindows="mobiscroll"></mbsc-eventcalendar>
        </mbsc-form-group>
        <mbsc-form-group class="mbsc-col-sm-12 mbsc-col-md-6">
            <mbsc-form>
                <mbsc-form-group-title>Mobiscroll Theme</mbsc-form-group-title>
                <mbsc-segmented-group [(ngModel)]="mobiscroll" (change)="changeMobiscroll()">
                    <mbsc-segmented value="mobiscroll">Light</mbsc-segmented>
                    <mbsc-segmented value="mobiscroll-dark">Dark</mbsc-segmented>
                    <mbsc-segmented value="mobiscroll-lime">Custom</mbsc-segmented>
                </mbsc-segmented-group>
            </mbsc-form>
            <mbsc-eventcalendar [data]="events" [options]="mobiscrollSettings" #mbscCalMobiscroll="mobiscroll"></mbsc-eventcalendar>
        </mbsc-form-group>
    </div>
</div>

Event Calendar - Range view

Change demo
Range view
Angular Event calendar two week range demo. Use it with a week calendar and event list for the range. Supports days/weeks. For Angular 2/4/5/6/7 and Ionic 2/3/4.
import { MbscEventcalendarOptions } from '@mobiscroll/angular';

let now = new Date();

@Component({
    selector: 'demo-app',
    templateUrl: './app.component.html'
})
export class AppComponent {
    events: Array < any > = [{
        d: new Date(now.getFullYear(), now.getMonth(), 8, 8, 0),
        text: 'Green box to post office',
        color: '#6e7f29'
    }, {
        start: new Date(now.getFullYear(), now.getMonth(), 8, 8, 45),
        end: new Date(now.getFullYear(), now.getMonth(), 8, 9, 0),
        text: 'Quick mtg. with Martin',
        color: '#de3d83'
    }, {
        start: new Date(now.getFullYear(), now.getMonth(), 8, 9, 30),
        end: new Date(now.getFullYear(), now.getMonth(), 8, 10, 30),
        text: 'Product team mtg.',
        color: '#f67944'
    }, {
        start: new Date(now.getFullYear(), now.getMonth(), 8, 11, 0),
        end: new Date(now.getFullYear(), now.getMonth(), 8, 11, 30),
        text: 'Stakeholder mtg.',
        color: '#f67944'
    }, {
        start: new Date(now.getFullYear(), now.getMonth(), 8, 13, 0),
        end: new Date(now.getFullYear(), now.getMonth(), 8, 13, 30),
        text: 'Lunch @ Butcher\'s',
        color: '#00aabb'
    }, {
        start: new Date(now.getFullYear(), now.getMonth(), 8, 15, 0),
        end: new Date(now.getFullYear(), now.getMonth(), 8, 16, 0),
        text: 'General orientation',
        color: '#f67944'
    }, {
        d: (now.getMonth() + 1) + '/14',
        text: 'Dexter BD',
        color: '#37bbe4'
    }, {
        d: (now.getMonth() + 1) + '/5',
        text: 'Luke BD',
        color: '#37bbe4'
    }, {
        d: 'w3',
        text: 'Employment (Semi-weekly)',
        color: '#635045'
    }, {
        d: 'w5',
        text: 'Employment (Semi-weekly)',
        color: '#ff9966'
    }, {
        start: new Date(now.getFullYear(), 1, 7),
        end: new Date(now.getFullYear(), 1, 25),
        text: 'Dean OFF',
        color: '#99ff33'
    }, {
        start: new Date(now.getFullYear(), 2, 5),
        end: new Date(now.getFullYear(), 2, 14),
        text: 'Mike OFF',
        color: '#e7b300'
    }, {
        start: new Date(now.getFullYear(), 4, 7),
        end: new Date(now.getFullYear(), 4, 16),
        text: 'John OFF',
        color: '#669900'
    }, {
        start: new Date(now.getFullYear(), 5, 1),
        end: new Date(now.getFullYear(), 5, 11),
        text: 'Carol OFF',
        color: '#6699ff'
    }, {
        start: new Date(now.getFullYear(), 6, 2),
        end: new Date(now.getFullYear(), 6, 17),
        text: 'Jason OFF',
        color: '#cc9900'
    }, {
        start: new Date(now.getFullYear(), 7, 6),
        end: new Date(now.getFullYear(), 7, 14),
        text: 'Ashley OFF',
        color: '#339966'
    }, {
        start: new Date(now.getFullYear(), 8, 10),
        end: new Date(now.getFullYear(), 8, 20),
        text: 'Marisol OFF',
        color: '#8701a9'
    }, {
        start: new Date(now.getFullYear(), 9, 1),
        end: new Date(now.getFullYear(), 9, 12),
        text: 'Sharon OFF',
        color: '#cc6699'
    }, {
        d: '12/25',
        text: 'Christmas Day',
        color: '#ff0066'
    }, {
        d: '1/1',
        text: 'New Year\'s day',
        color: '#99ccff'
    }, {
        d: '4/1',
        text: 'April Fool\'s Day',
        color: '#ff6666'
    }, {
        d: '11/2',
        text: 'File Form 720 for the third quarter',
        color: '#a63e14'
    }, {
        d: '11/2',
        text: 'File Form 730 and pay tax on wagers accepted during September',
        color: '#a63e14'
    }, {
        d: '11/2',
        text: 'File Form 2290 and pay the tax for vehicles first used during September',
        color: '#a63e14'
    }, {
        d: '11/2',
        text: 'File Form 941 for the third quarter',
        color: '#a63e14'
    }, {
        d: '11/2',
        text: 'Deposit FUTA owed through Sep if more than $500',
        color: '#a63e14'
    }, {
        d: '11/30',
        text: 'Deposit payroll tax for payments on Nov 21-24 if the semiweekly deposit rule applies',
        color: '#a63e14'
    }, {
        d: '11/30',
        text: 'File Form 730 and pay tax on wagers accepted during October',
        color: '#a63e14'
    }, {
        d: '11/30',
        text: 'File Form 2290 and pay the tax for vehicles first used during October',
        color: '#a63e14'
    }];

    eventSettings: MbscEventcalendarOptions = {
        lang: '',
        theme: '',
        display: 'inline',
        view: {
            calendar: {
                type: 'week',
                size: 2
            },
            eventList: {
                type: 'week',
                size: 2
            }
        },
    };
}
<mbsc-eventcalendar [data]="events" [options]="eventSettings"></mbsc-eventcalendar>

Looking for something you didn't see or have a sales question?
Ask us about it, we're here to help.

Component license


Purchase component licenses if you are looking for specific funcionality.

Total


All features will be included with the license.

Buy component license

Framework license


Get all 36 components, including with the Framework license.



Mobiscroll for Angular & Ionic $595


Use Javascript when building with plain and simple JS. Use jQuery when you have jQuery already included or if you are building with jQuery Mobile. Use AngularJS when building with Angular 1.x or Ionic 1. Use Angular when building with Angular 2/4/5/6/7 or Ionic 2/3/4. Use it when you are building your app or website with React.


Buy framework license
See other licensing options

Framework license


Get all 36 components, including with the Framework license.



Mobiscroll for Angular $595


  • Use it when building with plain and simple JS
  • Compatible with vanilla JS app or frameworks like Vue
  • Royalty-free commercial usage
  • Technical support is included with the license
  • Use it with jQuery and jQuery Mobile
  • Enjoy the familiar API if you already use jQuery
  • Royalty-free commercial usage
  • Technical support is included with the license
  • Use it with Angular JS and Ionic 1
  • For web and mobile apps based on Angular 1.x
  • Royalty-free commercial usage
  • Technical support is included with the license
  • Use it with Angular 2/4/5/6/7 and Ionic 2/3/4
  • Visual Studio and VS Code integration
  • Royalty-free commercial usage
  • Technical support is included with the license
  • Use it when building with React JS
  • Collection of UI components for web and mobile
  • Royalty-free commercial usage
  • Technical support is included with the license
Buy framework license
See other licensing options

Framework license


Select the development framework you are using. Get all 36 components with the license.

Mobiscroll for Javascript
Mobiscroll for jQuery
Mobiscroll for React
Mobiscroll for Angular
Mobiscroll for Angular JS
  • Use it when building with plain and simple JS
  • Compatible with vanilla JS app or frameworks like Vue
  • Royalty-free commercial usage
  • Technical support is included with the license
  • Use it with jQuery and jQuery Mobile
  • Enjoy the familiar API if you already use jQuery
  • Royalty-free commercial usage
  • Technical support is included with the license
  • Use it with Angular JS and Ionic 1
  • For web and mobile apps based on Angular 1.x
  • Royalty-free commercial usage
  • Technical support is included with the license
  • Use it with Angular 2/4/5/6/7 and Ionic 2/3/4
  • Visual Studio and VS Code integration
  • Royalty-free commercial usage
  • Technical support is included with the license
  • Use it when building with React JS
  • Collection of UI components for web and mobile
  • Royalty-free commercial usage
  • Technical support is included with the license
Buy framework license
See other licensing options

Select the framework you are interested in

Javascript
jQuery
Angular
Angular JS
React

Use Javascript when building with plain and simple JS.

Use jQuery when you have jQuery already included or if you are building with jQuery Mobile.

Use AngularJS when building with Angular 1.x or Ionic 1.

Use Angular when building with Angular 2/4/5/6/7 or Ionic 2/3/4.

Use it when you are building your app or website with React.

Do you need additional support seats?

The framework license comes with one support seat. ( +$50/seat )

Add the source code?

Price
Buy now
Customize & try demos locally
Sign in or start your free trial

What framework are you using?

Javascript
jQuery
AngularJS
Angular
Ionic
React
Other
Select a framework
Email address

Customize & try this demo locally
Sign in or start your free trial

We have to set you up with a trial for this to run 👍

Email address

Customize & try demos locally
You can download and use Mobiscroll for Free

What framework are you using?

Javascript
jQuery
AngularJS
Angular
Ionic
React
Other
Select a framework
Install demo in your app
Follow this quick, two minute install guide
Close window

Step 1.Install the Mobiscroll CLI from npm

Copy command
$ npm install -g @mobiscroll/cli

The CLI makes configuring your apps super simple 👍

Step 2.Run the following command in the root folder of your Ionic project

Copy command
$ mobiscroll config ionic
$ mobiscroll config ionic --lite

You will be prompted to log in with your mobiscroll account. Set your password here

Create an Ionic 3 & Mobiscroll starter with the CLI:

$ mobiscroll start ionic myStarter

Run this command for Ionic 4 & Mobiscroll starter:

$ mobiscroll start ionic-angular myStarter

Step 3.Copy the code into your app. HTML goes into the markup, TS into Typescript.

Copy TS
Copy HTML
Copy CSS

Run ionic serve in the root folder of your app 🎉

Copy command
$ ionic serve
Thanks for downloading
Try and customize the app locally

Extract the zip file and run the project like any Ionic app. Make sure to have Ionic CLI installed and open the terminal in the app root folder.

Step 1. Run in root folder
$ npm install
Step 2. Start the app
$ ionic serve

Let us know if we can help and enjoy!

Change your password
Need to update your password? Enter and hit the button below

You are setting a password for the account

New Password Required Enter at least 6 characters
Change your password
Need to update your password? Enter and hit the button below

Your password has been changed!

Thanks for downloading
Customize demos locally

Everything is set up so that you can dig in right away and start exploring.

We have set up a trial so that you can try the demos locally.

Extract the zip file and open the demo in your favorite browser. To install Mobiscroll in your project follow instructions from this page.


Let us know if we can help and enjoy! 👍

Thanks for downloading
Customize demos locally

Please extract the zip file and run the project like any Angular CLI app. Make sure to have the Angular CLI installed.

For installation and usage, extract the zip file and open a terminal window and follow these steps.

Step 1. Run in root folder
$ npm install
Step 2. Start the app
$ ng serve --open

Let us know if we can help and enjoy! 👍

Thanks for downloading
Customize demos locally

Everything is set up so that you can dig in right away and start exploring.

We have set up a trial so that you can try the demos locally.

The easiest way to get started is to follow the installation steps and by grabbing the code directly from the demo page. Let us know if we can help and enjoy!

You'll find a fully functional Kitchen-sink Ionic app in the zip file.

Thanks for downloading
Customize demos locally

Everything is set up so that you can dig in right away and start exploring.

We have set up a trial so that you can try the demos locally.

The demos are using Babel's in-browser ES6 and JSX transformer. Extract the zip file and open the demo in your browser. To install Mobiscroll in your project follow instructions from this page.


Let us know if we can help and enjoy! 👍

Demos
Alerts & notifications
Alert Notifications Note
Components
Alerts & notifications 3
Buttons 4
Calendar 27
Cards 14
Color 10
Date & Time 20
Event Calendar 25
Forms 9
Grid layout 7
Image 7
Inputs & fields 6
Listview 17
Measurement 10
Navigation 8
Number 8
Numpad 13
Option List 4
Popup 10
Range 19
Scroller 7
Scrollview 5
Select 16
Slider & progress 4
Styling 6
Timer 5
Timespan 6
Toggle & Radio 4
Treelist 7
Theme Select
Mobiscroll
Mobiscroll Dark
Material
Material Dark
iOS
iOS Dark
Bootstrap
Windows
Windows Dark
Display Mode
Language Locale
See other demos and change options
Theme
Display
Locale
See other demos