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

Yearly Scheduler and Multirange

Asked by Anonymous
1 month 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]
1 month ago.

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

Answer posted by Dan Letecky [DayPilot]
1 month 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
1 month 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]
1 month 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
1 month 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]
1 month 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.

Comment posted by Anonymous
1 month ago.

It works now for me thanks for the help!. As a follow up the rectangleSelect in the yearly scheduler turns all dates to January in its arguments. Should I make a new Theard for this?

Comment posted by Dan Letecky [DayPilot]
1 month ago.

You don’t need to create a new thread for this, I will take a look at it.

Comment posted by Dan Letecky [DayPilot]
1 month ago.

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

Comment posted by Anonymous
23 days ago.

I just tested it and it works for me thanks!

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