Sorting events

Hi all. I need some help with scheduler.
I don’t understand how I can sort events in each day by specified field, not by time (month view). Documentation and searching by “sort” or “order” has no results.
Thanks for you attention.

Can you provide more details - what do you mean by sorting?
Events on a page always placed according their time ( time defines their position relative to time|date scales ) , so I’m not sure how they can be sorted.

I have an events, which includes fields besides time and name, author, author_type etc. And the situation is, that I need sort by the author_type not by the event time. Is it a possible?

If you understood correctly - you have 2 events with same time, but with different custom properties and you want to define their top-to-bottom order based on such custom property, right?

It can be done only for month view

scheduler._time_order=function(evs){ evs.sort(function(a,b){ if (a.prop == b.prop) return a.start_date>b.start_date?1:-1; else return a.prop > b.prop?1:-1; }) }

Not exactly. Actually I don’t need sort by the time at all, I only need sort by the defined field.

Did you have try the above code snippet?

Alright, it’s working) Thanks a lot!
But it’s strange, there are some data rows now, which block each other, and big white spaces but not in all days with data.

Event-placing logic still expecting that events are date-ordered so some unexpected side effect can occur.

Unfortunately any other solution will require complex modification in existing source code.

I can see that significant code modification would be required.
But perhaps you can see a way without this when i ask you

if there is a possibility to manage the left-right order of two events with exactly the same start and end-date … I mean, when i am using 2 users like the shared_event Examples, is there apossibility to, perhaps, playce user_1’s events allway on the right (when two collapse each other) ?

:slight_smile: Would be grate to keep overview!