#101902
yavordashew
Member

Hi skriaa,
I was able to asses your use case a bit more with the info that you have shared and reproduce your issue.
Also I have prepared a code snippet that could solve your situation:

//In your app.component.ts file
import { Component, ViewChild, OnInit, AfterViewInit, ViewEncapsulation } from '@angular/core';
import { SchedulerComponent, SchedulerDataSource, SchedulerViewType, SchedulerViews, SchedulerViewSelectorType, SchedulerTimelineDayScale, SchedulerResource } from 'smart-webcomponents-angular/scheduler';
@Component({
    selector: 'app-root',
    templateUrl: './app.component.html',
    styleUrls: ['./app.component.css'],
    encapsulation: ViewEncapsulation.None
})
export class AppComponent implements AfterViewInit, OnInit {
    @ViewChild('scheduler', { read: SchedulerComponent, static: false }) scheduler: SchedulerComponent;
    view = 'workWeek' as SchedulerViewType;
    views = [{
        label: 'Work Week',
        value: 'workWeek',
        type: 'week',
        shortcutKey: 'W'
    }, 'month'] as SchedulerViews[];
// rest of your code

The problem is in the typescript definition for the Scheduler views.
Let me know if my suggestion above works for you!
Please, do not hesitate to contact us if you have any additional questions.
Best regards,
Yavor Dashev
Smart UI Team
https://www.htmlelements.com/