Page 1 of 1

[REACT] Calendar config error unable to understand

Posted: Mon Feb 06, 2023 7:11 pm
by dphilip

The calendar config I use works well for almost all cases, except when I try to drop an event very close to the latest datetime of availability
Here is the calendar config error I get <CalendarID> calendar does not provide any working time intervals, but as you can see the config I have attached below, I am providing a working time interval.

CalendarConfigError.jpg
CalendarConfigError.jpg (34.27 KiB) Viewed 529 times

This is the config for the calendar:

CalendarConfig.jpg
CalendarConfig.jpg (30.46 KiB) Viewed 529 times

Am I missing some config?


Re: [REACT] Calendar config error unable to understand

Posted: Tue Feb 07, 2023 3:23 pm
by alex.l

That might be caused by many reasons. As example, there is not enough space of working period to schedule the event. As example, you have constraints for startDate of the task you try to schedule and it cannot be scheduled in available period.
But better to check what exactly is going on. Could you please attach full JSON with data you used and steps to reproduce this?


Re: [REACT] Calendar config error unable to understand

Posted: Tue Feb 07, 2023 4:25 pm
by dphilip

I see the same error in CalendarHighlight example at this location: https://bryntum.com/products/schedulerpro/docs/api/SchedulerPro/feature/CalendarHighlight

Steps to reproduce:

  1. Go to the following url:https://bryntum.com/products/schedulerpro/docs/api/SchedulerPro/feature/CalendarHighlight
  2. Locate the Drag me example
  3. Move the Drag me event outside the available blue area

you get the same Calendar Config error.
I hope this helps.

CalendarConfigError.gif
CalendarConfigError.gif (1.97 MiB) Viewed 507 times

Re: [REACT] Calendar config error unable to understand

Posted: Tue Feb 07, 2023 9:16 pm
by marcio

Hey dphilip@kinaxis.com,

That happens because you're trying to move your event outside the working calendar pre-defined.

It's expected to work that way.

What's your suggestion/expectation about how that should work??


Re: [REACT] Calendar config error unable to understand

Posted: Tue Feb 07, 2023 9:35 pm
by dphilip

When we drag an event outside of the available zone, it should automatically "cancel the changes and do nothing".
Is there a way to configure SchedulerPro to "pick" this option, without the error dialog?


Re: [REACT] Calendar config error unable to understand

Posted: Wed Feb 08, 2023 7:09 am
by alex.l

Yes, sure. Please see docs for https://bryntum.com/products/schedulerpro/docs/api/SchedulerPro/model/ProjectModel#event-schedulingConflict event. You can subscribe on it or even better on https://bryntum.com/products/schedulerpro/docs/api/SchedulerPro/model/ProjectModel#event-emptyCalendar
and resolve conflict automatically without a dialog.

project.on('emptyCalendar', ({ schedulingIssue, continueWithResolutionResult }) => {
    // apply the first resolution and continue
    schedulingIssue.getResolutions()[0].resolve();
    continueWithResolutionResult(EffectResolutionResult.Resume);
})