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

Yearly Scheduler and Multirange

Asked by Anonymous
9 days ago.

We use DayPilot with React.

We wanted to use the new yearly scheduler together with multi range. But when we use the mutirange.add function for dates not in January we get an Error:

Error: Time range selection 'start' out of timeline

Comment posted by Dan Letecky [DayPilot]
8 days ago.

I confirm the bug. It will be fixed shortly - I’ll keep you updated.

Answer posted by Dan Letecky [DayPilot]
8 days ago.

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

For now, a range that spans multiple rows will be limited to the first row when added using multirange.add().

Comment posted by Anonymous
19 hours ago.

Thanks for the Quick reply. I just installed the new Version of Daypilot and I still get the same bug. In the yearly Scheduler with allowMultiRange set to true. I get the dates that I would expect in the args, but when I try to add them with multirange.add() I get the error. I can set them if I change the date to January and use the Month as ResourceId but this is not he behaviour I would expect.

Comment posted by Dan Letecky [DayPilot]
18 hours ago.

It is necessary not to set any id for the rows if you want to use only a date to add a selection. Otherwise, the row is treated as a resource and the id is required for the selection as well.

You can test the multirange.add() method in the console of the year view demo (allowMultiRange doesn’t have to be set to true for programmatic selection modification):

dp.multirange.add({start:"2025-06-05", end:"2025-06-10"});
Comment posted by Anonymous
14 hours ago.

Ok that’s the problem then I guess, we use it with Typescript and Multirange.add still requires a resourceId in the type declaration.

Comment posted by Dan Letecky [DayPilot]
14 hours ago.

Oh, thanks for the update. The resource id is now marked as optional in the TypeScript definitions in the latest sandbox build (2025.1.6346). That should let you use the API for the year view without casting.

New Reply
This reply is
Attachments:
or drop files here
Your name (optional):