Hi,
I am using Dhtmlx scheduler v5.3.14 in my Angular project. I have created basic-scheduler component. But on initial load, it is appearing like this
then, I need to click on buttons, then grid view and other buttons appears properly.
This is my basic-scheduler.component.html code
<div #scheduler_here
class="dhx_cal_container"
style="width:100%; height:600px;">
<div class="dhx_cal_navline">
<div class="dhx_cal_prev_button"></div>
<div class="dhx_cal_next_button"></div>
<div class="dhx_cal_today_button"></div>
<div class="dhx_cal_date"></div>
<div class="dhx_cal_tab"
name="day_tab"></div>
<div class="dhx_cal_tab"
name="week_tab"></div>
<div class="dhx_cal_tab"
name="month_tab"></div>
</div>
<div class="dhx_cal_header"></div>
<div class="dhx_cal_data"></div>
</div>
and this is basic-scheduler.component.ts code
import {
Component, ElementRef, OnInit, ViewChild,
ViewEncapsulation
} from '@angular/core';
declare let scheduler: any;
@Component({
selector: 'basic-scheduler',
templateUrl: './basic-scheduler.component.html',
styleUrls: ['./basic-scheduler.component.css'],
encapsulation: ViewEncapsulation.None
})
export class BasicSchedulerComponent implements OnInit {
@ViewChild('scheduler_here', { static: true }) schedulerContainer: ElementRef;
ngOnInit(): void {
scheduler.config.first_hour = 8;
scheduler.config.last_hour = 18;
scheduler.parse([
{
id: 1,
text: 'Mock Meeting A',
start_date: '2025-06-20 09:00',
end_date: '2025-06-20 10:00'
},
{
id: 2,
text: 'Mock Meeting B',
start_date: '2025-06-20 11:00',
end_date: '2025-06-20 12:00'
}
], 'json');
scheduler.init(this.schedulerContainer.nativeElement, new Date(), 'day');
}
}