Hello,
I'm using a configuration similar to the official Calendar Scheduler demo: https://www.bryntum.com/examples/calendar/calendar-scheduler/
Also I'm using an external events editor, open on beforeEventEdit().
I have trouble working with events due to the durationUnit being inconsistent. For instance looking at the event using this listener:
beforeEventEdit({ eventRecord }) {
console.log(eventRecord);
}
reveals that:
- durationUnit for an existing event is "day"
- durationUnit for an event created by clicking and dragging in Timeline view is "day"
- durationUnit for an event created by clicking and dragging in Day or Week views is "m"
- durationUnit for an event created by double clicking is "hour"
Is there a reason for this and how should I go about streamlining things?
I tried to use durationMS instead of duration but this doesn't entirely solve the problem since I also use the sync transport mechanism, which doesn't POST the durationMS field.
Also the server side code responding to sync needs to respond with an object containing a "duration" property that can be interpreted in different ways.
The effect is that at any point you can have, say, 3 different events displayed, each of them with a duration expressed in a different unit:
- in days if the event existed on initial load or if it was created by clicking and dragging in Timeline view
- in minutes if the event was created by clicking and dragging in Day or Week view
- in hours if the event was created by double clicking
which is very inconvenient when using an external editor and the sync mechanism.
Can you recommend an optimal way of approaching this?
Thanks.