Our pure JavaScript Scheduler component


Post by asatrash »

Hi,
scheduler.features.resourceTimeRanges.store.getAt(0).setStartDate(new Date("2019-01-01T07:00:00:00"), true); 
or
scheduler.features.resourceTimeRanges.store.getAt(0).setStartDate(new Date(2019, 1, 1, 7), true);

doesn;t seems to be working in the Resource time ranges demo. The Time range dissapears from the scheduler.

Is that syntax wrong or is there a bug? Same with setEndDate();

I used the bryntum.query("sheduler").......... feature in console to test it. I hope it is the same.

Thanks,
Asat
Last edited by asatrash on Thu May 23, 2019 12:16 pm, edited 2 times in total.

Post by mats »

Title of post is about setEndDate and your code snippet uses setStartDate...?

What result do you expect? You set it to February, while demo is showing January?

Post by asatrash »

Oh. new Date(2019, 1, 1, 7) is in February. Are months starting from zero?

new Date(2019, 0, 1, 7) worked fine.

Sorry to bother but where can I find these information. https://www.bryntum.com/docs/scheduler/ ... ld-endDate say the date should be in ISO8601.

Post by mats »

Are months starting from zero?
Yes, that's how JS works. Please read: https://developer.mozilla.org/en-US/doc ... jects/Date

Post by asatrash »

My bad! :)

Post Reply