Event creation modal
Usage
theme: 'ios' You can turn auto theming on and let it decide based on the platform.
Usage
themeVariant: 'light' You can turn auto dark mode on based on system settings.
Usage
touchUi: true
// touch interaction is enabled Use touch interaction on mobile or pointer interaction on desktop.
Usage
locale: localeEn Selecting the locale loads the localized settings and the translated UI text.
Event creation modal
Use the popup to show a modal with an add/edit form for event creation and/or update. The popup can be easily set up to be shown right in the middle of the screen, top, bottom or anchored to the newly added event. Check out the different display modes and play around with the different configurations.
You have full control over what is shown within the popup. Use Mobiscroll form elements or any components that you are already using throughout your application.
Demo
Code
import { CommonModule } from '@angular/common';
import { Component, ViewChild } from '@angular/core';
import { FormsModule } from '@angular/forms';
import {
MbscCalendarEvent,
MbscDatepickerOptions,
MbscEventcalendarView,
MbscModule,
MbscPopup,
MbscPopupOptions,
Notifications,
setOptions ,
} from '@mobiscroll/angular';
setOptions({
locale: ,
theme: ' ',
themeVariant: ' '
});
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
providers: [Notifications],
standalone: true,
imports: [CommonModule, FormsModule, MbscModule],
})
export class AppComponent {
constructor(private notify: Notifications) {}
@ViewChild('popup', { static: false }) popup!: MbscPopup;
myEvents: MbscCalendarEvent[] = [
{
id: 1,
start: '2026-10-08T13:00',
end: '2026-10-08T13:45',
title: "Lunch @ Butcher's",
description: '',
allDay: false,
bufferBefore: 15,
free: true,
color: '#009788',
},
{
id: 2,
start: '2026-10-30T15:00',
end: '2026-10-30T16:00',
title: 'Conference',
description: '',
allDay: false,
bufferBefore: 30,
free: false,
color: '#ff9900',
},
{
id: 3,
start: '2026-10-29T18:00',
end: '2026-10-29T22:00',
title: 'Site Visit',
description: '',
allDay: false,
bufferBefore: 60,
free: true,
color: '#3f51b5',
},
{
id: 4,
start: '2026-10-31T10:30',
end: '2026-10-31T11:30',
title: 'Stakeholder mtg.',
description: '',
allDay: false,
free: false,
color: '#f44437',
},
];
myView: MbscEventcalendarView = { calendar: { type: 'month' } };
popupEventTitle: string | undefined;
popupEventDescription = '';
popupEventAllDay = true;
popupEventDates: any;
popupEventStatus = false;
mySelectedDate: any;
datePickerControls = ['calendar'];
datetimePickerControls = ['calendar', 'time'];
datePickerOptions: MbscDatepickerOptions = {
select: 'range',
showRangeLabels: false,
touchUi: true,
display: 'anchored',
};
popupOptions: MbscPopupOptions = {
width: 400,
contentPadding: false,
headerText: 'Add new event',
display: 'center',
buttons: [
'cancel',
{
text: 'Add',
keyCode: 'enter',
handler: () => {
const newEvent = {
title: this.popupEventTitle,
description: this.popupEventDescription,
allDay: this.popupEventAllDay,
status: this.popupEventStatus,
start: this.popupEventDates[0],
end: this.popupEventDates[1],
};
this.myEvents = [...this.myEvents, newEvent];
this.mySelectedDate = this.popupEventDates[0];
this.popup.close();
this.notify.toast({
message: 'Event added',
});
},
cssClass: 'mbsc-popup-button-primary',
},
],
showOverlay: false,
};
addEvent(): void {
this.popupEventTitle = 'New Event';
this.popupEventDescription = '';
this.popupEventAllDay = false;
this.popupEventStatus = false;
this.popupEventDates = [new Date(), new Date()];
this.popup.open();
}
}
<mbsc-page>
<div class="mbsc-form-group">
<div class="mbsc-button-group-block">
<mbsc-button (click)="addEvent()">Add event</mbsc-button>
</div>
</div>
<mbsc-popup #popup [options]="popupOptions">
<div class="mbsc-form-group">
<mbsc-input label="Title" [(ngModel)]="popupEventTitle"></mbsc-input>
<mbsc-input label="Description" [(ngModel)]="popupEventDescription"></mbsc-input>
</div>
<div class="mbsc-form-group">
<mbsc-switch label="All-day" [(ngModel)]="popupEventAllDay"></mbsc-switch>
<mbsc-datepicker
[(ngModel)]="popupEventDates"
[options]="datePickerOptions"
[controls]="popupEventAllDay ? datePickerControls : datetimePickerControls"
[startInput]="startInput"
[endInput]="endInput"
></mbsc-datepicker>
<mbsc-input #startInput label="Starts"></mbsc-input>
<mbsc-input #endInput label="Ends"></mbsc-input>
</div>
<mbsc-segmented-group [(ngModel)]="popupEventStatus">
<mbsc-segmented value="busy">Show as busy</mbsc-segmented>
<mbsc-segmented value="free">Show as free</mbsc-segmented>
</mbsc-segmented-group>
<div id="demo-event-date"></div>
</mbsc-popup>
<mbsc-eventcalendar [data]="myEvents" [view]="myView" [selectedDate]="mySelectedDate"></mbsc-eventcalendar>
</mbsc-page>