search envelope-o feed check
Home Unanswered Active Tags New Question
user comment-o

Angular DayPilot.Scheduler Object Missing on Gantt

Asked by Levy
4 years ago.

Hello there,

By refer to the doc https://doc.daypilot.org/gantt/angular/ section# DayPilot.Scheduler Object

' DayPilot Gantt uses the Scheduler control internally. If necessary, you can access the underlying DayPilot.Scheduler object using DayPilot.Gantt.scheduler property '

message() {
this.gantt.control.scheduler.message("Welcome!");
}

However I get error of this: Property 'scheduler' does not exist on type 'Gantt'.

Please advise how can DayPilot Gantt access the Schedule property?

I was using daypilot-pro-angular/trial/2019.4.4052

Answer posted by Dan Letecky [DayPilot]
4 years ago.

Accessing the internal "scheduler" object is a fallback solution and that's why the scheduler property is not included in the TypeScript definitions. You'll be able to access it if you cast the scheduler object to "any" like this:

  message() {
    const ganttControl = this.gantt.control as any;
    ganttControl.scheduler.message("Welcome!");
  }  
This question is more than 1 months old and has been closed. Please create a new question if you have anything to add.