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

Inconsistent type definition of events in CalendarConfig and MonthConfig (Daily/Weekly Calendar view vs Monthly Calendar view)

Asked by Anonymous
2 months ago.

The events field in CalendarConfig is defined as “events?: EventData[];” while in MonthConfig it is defined as “events?: EventData;” which is probably incorrect? This is supposed to represent multiple events, e.g. an array.

I get a compilation error when attempting to assign my events to it, whereas in normal calendar it works properly.

Note: editing the .d.ts file manually fixes the issue and it seems the events are properly being displayed.

Moreover, there is a discrepancy in function definitions between them as well - CalendarConfig contains a definition for the function overload “remove(id: EventId): void;” while MonthConfig does not.

Is this intentional or is it simply an oversight and a definition needs to be added?

Thanks in advance.

Answer posted by Dan Letecky [DayPilot]
2 months ago.

> in MonthConfig it is defined as “events?: EventData;”

This was incorrect, and it has been fixed now in the latest release.

> CalendarConfig contains a definition for the function overload “remove(id: EventId): void;” while MonthConfig does not

This method was not implemented, but it’s now available in the latest release:

This question is more than 1 months old and has been closed. Please create a new question if you have anything to add.