Angular Scheduler Dynamic Resource Filtering
Get started with this exampleUsage
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
clickToCreate: true,
// click to create is on dragToCreate: true,
// drag to create is on dragToMove: true,
// reordering is on dragToResize: true,
// resizing is on eventDelete: true
// deleting is on Fine-tune drag & drop with these options, which are false by default.
Usage
locale: localeEn Selecting the locale loads the localized settings and the translated UI text.
Dynamic Resource Filtering
Resources can be dynamically turned on and off. This will show or hide the resource and can be done runtime the same way as for any other calendar option.
Demo

Code
import { CommonModule } from '@angular/common';
import { HttpClient } from '@angular/common/http';
import { Component, OnInit } from '@angular/core';
import { FormsModule } from '@angular/forms';
import { MbscCalendarEvent, MbscEventcalendarView, MbscModule, setOptions } from '@mobiscroll/angular';
setOptions({
locale: ,
theme: ' ',
themeVariant: ' '
});
const resources = [
{
id: 1,
name: 'Ryan',
color: '#f7c4b4',
},
{
id: 2,
name: 'Kate',
color: '#c6f1c9',
},
{
id: 3,
name: 'John',
color: '#e8d0ef',
},
];
@Component({
selector: 'app-root',
templateUrl: './app.component.html',
standalone: true,
imports: [CommonModule, FormsModule, MbscModule],
})
export class AppComponent implements OnInit {
constructor(private http: HttpClient) {}
participants: Record<number, boolean> = {
1: true,
2: true,
3: true,
};
view: MbscEventcalendarView = {
scheduler: {
type: 'week',
allDay: false,
startDay: 1,
endDay: 5,
startTime: '08:00',
endTime: '17:00',
},
};
myEvents: MbscCalendarEvent[] = [];
myResources = resources;
filter(): void {
this.myResources = resources.filter((r) => this.participants[r.id]);
}
ngOnInit(): void {
this.http.jsonp<MbscCalendarEvent[]>('https://trial.mobiscroll.com/resource-events-shared/', 'callback').subscribe((resp) => {
this.myEvents = resp;
});
}
}
<mbsc-page>
<div class="mbsc-grid mbsc-no-padding">
<div class="mbsc-row">
<div class="mbsc-col-sm-9 external-event-calendar">
<mbsc-eventcalendar
[view]="view"
[data]="myEvents"
[resources]="myResources"
[clickToCreate]="true"
[dragToCreate]="true"
[dragToMove]="true"
[dragToResize]="true"
></mbsc-eventcalendar>
</div>
<div class="mbsc-col-sm-3">
<div class="mbsc-form-group-title">Show available tasks</div>
<mbsc-checkbox label="Ryan" [(ngModel)]="participants[1]" (change)="filter()"></mbsc-checkbox>
<mbsc-checkbox label="Kate" [(ngModel)]="participants[2]" (change)="filter()"></mbsc-checkbox>
<mbsc-checkbox label="John" [(ngModel)]="participants[3]" (change)="filter()"></mbsc-checkbox>
</div>
</div>
</div>
</mbsc-page>
.dynamic-resources-calendar {
border-right: 1px solid #ccc;
}