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

Angular Scheduler Zoom : 'name' does not exist in type 'ZoomLevel

Related article: Angular Scheduler: Zoom
Asked by Adam
1 year ago.

Hi, I follow the zoom tutorial on

zoomLevels: [
        name: "Year",
        properties: {
          scale: "Day",
          cellWidth: 40,
          timeHeaders: [{groupBy: "Year"}, {groupBy: "Month", format: "MMMM"}, {groupBy: "Day", format: "d"}],
          startDate: function (args) { return; },
          days: function (args) { return; },

but on this part inside config zoomLevels compiler say 'name' does not exist in type 'ZoomLevel'.

ERROR in src/app/test/daypilot-scheduler/daypilot-scheduler.component.ts(113,9): error TS2322: Type '{ name: string; properties: { scale: string; cellWidth: number; timeHeaders: ({ groupBy: string; } | { groupBy: string; format: string; })[]; startDate: (args: any) => any; days: (args: any) => any; }; }' is not assignable to type 'ZoomLevel'.
      Object literal may only specify known properties, and 'name' does not exist in type 'ZoomLevel'.

Please advise how to solve it?

Answer posted by Dan Letecky [DayPilot]
1 year ago.

This should be fixed now in the latest sandbox build (2019.4.4154).

The tutorial project uses an untyped config object so you can use this approach as a workaround:

config: any = {
 // ...
This question is more than 3 months old and has been closed. Please create a new question if you have anything to add.