Page 1 of 1
[REACT] Non-working calendar events for different view presets
Posted: Tue Nov 29, 2022 9:54 am
by sasha573
Hi!
I've noticed that loaded Non-working calendar events are displayed on "minuteAndHour", "hourAndDay", however not displayed on "weekAndMonth".
In addition, If the duration of non-working interval is less then 1 hour, it is displayed only on "minuteAndHour" view preset.
Could we fix it and display all non-working caledar intervals on "weekAndMonth" preset?
Another issue is we would need to get non-working calendar interval data on click event. Is it possible to catch OnClick on non-working calendar intervals?
Re: [REACT] Non-working calendar events for different view presets
Posted: Tue Nov 29, 2022 12:12 pm
by marcio
Hey sasha573,
That happens because of the zoom level of the Gantt, when the zoom is too high for the non-working intervals, it doesn't show because would be like only a line (or less than that). So that's why you don't see those intervals depending on the viewPreset.
Regarding the click, we don't support currently the non-working interval data click, the closest thing that we have is this config for resource time ranges (that could be adapted for your case) https://bryntum.com/products/scheduler/docs/api/Scheduler/feature/ResourceTimeRanges#config-enableMouseEvents
Re: [REACT] Non-working calendar events for different view presets
Posted: Tue Nov 29, 2022 12:15 pm
by marcio
Besides that, I created a feature request ticket for that click handler https://github.com/bryntum/support/issues/5679
Re: [REACT] Non-working calendar events for different view presets
Posted: Tue Nov 29, 2022 1:24 pm
by sasha573
Re: [REACT] Non-working calendar events for different view presets
Posted: Tue Nov 29, 2022 8:40 pm
by sasha573
Hi again!
Just for better understanding, how is it determined when the view preset is not able to display non-working calendar event?
As far as I understand if interval is less than calendar cell, the event is not displayed. E.g. for "dayAndMonth" view preset if interval is less the 1 day, it is not highligted on the gantt. Is it correct?
- Capture8.PNG (3.82 KiB) Viewed 311 times
And one more clarification, is there any functionality to edit non-working events from gantt or maybe you are planning to implement it in the future releases?
Re: [REACT] Non-working calendar events for different view presets
Posted: Wed Nov 30, 2022 4:31 am
by alex.l
For https://bryntum.com/products/gantt/docs/api/Scheduler/feature/NonWorkingTime
Please note that to not clutter the view (and have a large negative effect on performance) the feature does not render ranges shorter than the base unit used by the time axis. The behavior can be disabled with hideRangesOnZooming config.
The feature also bails out of rendering ranges for very zoomed out views completely for the same reasons (see maxTimeAxisUnit for details).
Please check if you set https://bryntum.com/products/gantt/docs/api/Scheduler/feature/NonWorkingTime#config-hideRangesOnZooming to false
There is also https://bryntum.com/products/gantt/docs/api/Scheduler/feature/NonWorkingTime#config-maxTimeAxisUnit that you can configure to have desired behaviour