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
I confirm the bug. It will be fixed shortly - I’ll keep you updated.
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().
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.
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.
id
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):
true
dp.multirange.add({start:"2025-06-05", end:"2025-06-10"});
Ok that’s the problem then I guess, we use it with Typescript and Multirange.add still requires a resourceId in the type declaration.
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.