You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
chuckn0rris opened this issue
Jul 19, 2023
· 1 comment
Assignees
Labels
bugSomething isn't workingforumIssues from forumhigh-priorityUrgent to have fixedOEMOEM customerpremiumresolvedFixed but not yet released (available in the nightly builds)
Unscheduled events go before scheduled ones
Compare by floored start date
If equal, compare by floored duration
If equal, compare by start date
If equal, compare by duration_
In fact it's sorted by duration. See Breakfast is after Lunch and DInner
The text was updated successfully, but these errors were encountered:
static interDaySorterFn(event1, event2) {
// Handle event wrapping which is what MonthView does.
event1 = event1.eventRecord || event1;
event2 = event2.eventRecord || event2;
const
{
startDate : start1,
isInterDay : event1InterDay
} = event1,
{
startDate : start2,
isInterDay : event2InterDay
} = event2;
// Unscheduled events sort to the top.
if (!start1) {
return -1;
}
if (!start2) {
return 1;
}
// InterDay events sort to the top (https://github.com/bryntum/support/issues/1693).
if (event1InterDay !== event2InterDay) {
return Number(event2InterDay) - Number(event1InterDay);
}
// If both events fit inside one day cell, the only sort order we care about is start time.
if (!event1InterDay && !event2InterDay) {
return start1 - start2;
}
// Sort Duration (longest first), then by ending date (furthest in future first), then by start timestamp.
// This is *in-cell* sorting.
return event2.durationMS - event1.durationMS || event2.endingDate - event1.endingDate || start1 - start2;
}
bugSomething isn't workingforumIssues from forumhigh-priorityUrgent to have fixedOEMOEM customerpremiumresolvedFixed but not yet released (available in the nightly builds)
Forum post
According to docs here https://bryntum.com/products/calendar/docs/api/Calendar/util/EventSorter#function-defaultSorterFn-static
Sorting should be by startDate
_This sorting method implement following rules:
Unscheduled events go before scheduled ones
Compare by floored start date
If equal, compare by floored duration
If equal, compare by start date
If equal, compare by duration_
In fact it's sorted by duration. See Breakfast is after Lunch and DInner
The text was updated successfully, but these errors were encountered: