Abhilash
Abhilash

Reputation: 2953

syncfusion scheduler only starts to show events only after one month of the StartTime

Trying to use sycfusion vue scheduler but when looking at docs example link

This is the event data from the example in docs which has StartTime as January 15th 2008

let data = [{
Id: 1,
Subject: 'Paris',
StartTime: new Date(2018, 1, 15, 10, 0),
EndTime: new Date(2018, 1, 15, 12, 30),
IsAllDay: false,
RecurrenceRule: 'FREQ=DAILY;INTERVAL=1;COUNT=5'
}];

But in preview events are showing after one month from the StartTime on February 15th instead of january. Is this a bug or am I missing something?

Upvotes: 0

Views: 127

Answers (1)

Cheetha
Cheetha

Reputation: 706

That's not a bug - months in the Date object are 0-indexed, so it works properly.

new Date(2018, 1, 15, 10, 0) // Thu Feb 15 2018 10:00:00
new Date(2018, 0, 15, 10, 0) // Mon Jan 15 2018 10:00:00

More about Date object here

Upvotes: 1

Related Questions