| Issue 364: | Customising vertical ordering of events (month, basicWeek, basicDay) | |
| 66 people starred this issue and may be notified of changes. | Back to list |
The events I've setup are all 'all day' events (I'm using Google Calendar). Is there any way to order the events that display in the calendar (front-end) by Event Title, rather than Event Modification Date which it defaults to? At the moment, any time I modify an event description that event is put to the top of the FullCalendar display whereas I'd like them always to display ordered by title.
Feb 26, 2010
Project Member
#1
adamrs...@gmail.com
Labels:
-Type-Defect Type-Enhancement
Jul 12, 2010
the ordering of allDay events would be really usefull for me. The best way would be throught some parameter, but title ordering would be ok too.
Aug 25, 2010
Issue 563 has been merged into this issue.
Aug 26, 2010
right now it sorts by duration, then start time. should be able to customize this. accepting.
Summary:
Customising vertical ordering of events (month, basicWeek, basicDay)
Status: Accepted
Oct 21, 2010
What is the status of this ticket? I agree this would be a great feature, to be able to sort how the events are stack in the allDay section.
Mar 21, 2011
I'd like this as well. In my app I have a reason to delete an event, and then add it back again (stick=true) which puts it at the bottom of my month view of all-day events. I'd love to be able to be either to either: 1. Find out what order it was, and then put it back to that order after I remove/add. or 2. Set FC to auto-order by title, and have it automatically plop back into place. -Brian
May 12, 2011
I would really appreciate this feature!
May 16, 2011
any date when we can have this feature? http://goo.gl/TUnyt
Jun 26, 2011
'+1' for that feature :)
Jul 12, 2011
+1 for me too. In my example: I have multiple events, signed to users. Now ideally I would like to sort the events in the order, that the events to a specific user are below each other, instead of ordering on time length.
Aug 12, 2012
It would also be nice if you could specify certain events list at the bottom of the day for the month view, i.e. if you have a schedule for activities, and you want to note individuals unavailability at the bottom of the day (not the bottom of the list, but at the bottom of the day) or you want to indicate national or individual holidays or other times when you are unavailable, or some other admin information for a specific day/days, but not as a scheduled task, just information.
Aug 14, 2012
It would be nice if all-day events would be listed in the same order they are in the JSON string. Right now I have multi- all-day events at different venues and they don't show up in a row for the week despite the JSON string being ordered by date, start time and venue. They seem to be put in the calendar at random.
Aug 29, 2012
+1 for this feature. Ordering by custom event parameter would be great. :)
Sep 10, 2012
+1 this would really help polishing the functionality
Apr 3, 2013
Pls accept and work on this now. Would be helpful.
Apr 8, 2013
I have to subscribe to some calendars for non-profits I help out, but it'd be nice to set them to a lower priority so my appointments don't get buried in a +2 or whatever every time there's a day with multiple events. If I could control the order on month view that'd really help. So I suggest the ability to drag other calendar entries to a lower priority on the side list, or at least on a given day be able to drag something around.
May 31, 2013
it would be nice in month view
May 31, 2013
Maybe we can do some kind of x and y axis order/index (even a z index as well) for all 3 calendar views.
Jun 2, 2013
Alphabetization of All Day Events would be great! Please consider.
Jun 6, 2013
I could really use this too. I need the events to stay in a particular order so that I can show a sort of "header" event that spans across the week, and then have other day-level events under it. The problem I have is that I need to have multiple of these "header" events with their respective day events under them, but all the week-long events will float to the top with the given implementation. Many thanks for any assistance you can provide!
Jul 31, 2013
+1 for this feature. All my events for a particular calendar are "all day" events and I would like to be able to control the order, either by specifying an additional param in the JSON feed or enabling an option to output the items in the order they appear in the JSON feed's events array.
Aug 2, 2013
Addition: On the month view I would even like to be able to sort the entries in a custom way - _no matter_ if they have concrete start and end times assigned!
Aug 7, 2013
I would LOVE to see this feature implemented! Especially for Month view! Some of my events in my calendar have a "prioritiation" assigned to them. I'd like to have higher priority items shows at the top and lower priority items at the bottom.
Aug 13, 2013
(No comment was entered for this change.)
Labels:
-Type-Enhancement Type-Feature
Aug 15, 2013
Issue 1502 has been merged into this issue.
Aug 15, 2013
Issue 1501 has been merged into this issue.
Aug 15, 2013
Issue 1727 has been merged into this issue.
Aug 18, 2013
Issue 1613 has been merged into this issue.
Aug 22, 2013
Sorting of Day events by end date would be great for me. First/top event has closest deadline so should be at the top of the list.
Aug 24, 2013
Issue 1799 has been merged into this issue.
Aug 25, 2013
Issue 1922 has been merged into this issue.
Sep 29, 2013
Being able to customize event order would be great for me. Is there a chance of this feature being added?
Oct 28, 2013
*
Nov 7, 2013
I'd love to be able to drag and drop for order manually, as an option. I want to be able to use Google Calendars as a quick way to make a printable PDF calendar, but can't because I can't change the order of all-day events.
Dec 6, 2013
Anyone have any workarounds or patches for now?
Dec 19, 2013
OK, so for the past three years people have been requesting this but so far no help? Get with it and fix this. Maybe the ability to assign a priority to each event that would determine the order it was displayed. And speaking of fixes that you have ignored, how about the "import CSV file" problems?
Jan 21, 2014
Please fix this obvious problem!
Feb 10, 2014
Yes, please add sort order options. At least on events sources (multiple calendars) and all-day events vs timed events. Thank you !
Mar 16, 2014
How can we help with movement on this issue? Any stack overflow post gets dead ended here. Which is not an resolution.
Mar 17, 2014
jinak cirkus problem by hrali za 6 tis - michal to resil, to asi budem mit reprodukovanou muziku :-)
May 14, 2014
Yes please add this feature. I also have a requirement to sort by event type and I could really use this feature ASAP.
May 23, 2014
I too need this requirement....YES Please...
Jun 5, 2014
Here is a pull request with an implementation of this, via @axsuul: https://github.com/arshaw/fullcalendar/pull/134
Jun 7, 2014
Issue 2066 has been merged into this issue.
Aug 7, 2014
I have seen this time and time again as a feature request and it has never been addressed or even commented on by Google. So if it is too hard they just ignore it?
Aug 7, 2014
Ehh google has nothing to do with this code. I resolved this issue by appending seconds onto the timestamp based on the order I want them in.
Aug 12, 2014
YES!! Need to be able to drag and drop ALL DAY events into any order. Please help.
Aug 20, 2014
As i needed the same (customized sorting of events) i checked the source 'fullcalendar.js' and adjusted the function 'compareSlotSegs(seg1, seg2)' like this:
function compareSlotSegs(seg1, seg2) {
if (seg1.event.sorter != null && seg2.event.sorter != null)
return seg1.event.sorter - seg2.event.sorter;
else
return seg1.start - seg2.start || // earlier start time goes first
(seg1.event.title || '').localeCompare(seg2.event.title); // tie? alphabetically by title
}
=> You can now add a 'sorter' attribute to each event ( events.push( {
id: v_id,
[..]
sorter: v_sorter}); ) which will tell the calendar in which order to show the events.
=> The logic is: If there is a 'sorter' set for events it will be taken for sorting, otherwise the events will be sorted first by starttime, 2nd by title.
Aug 20, 2014
ti08m: in what cases does your adjustment work? I just tried it for not all-day events and the compareSlotSegs() isn't even executed.
Aug 20, 2014
I'm also working mainly with non all-day events. With my adjustments in the weekly and daily overview it's ok, however in the monthly all stays as before. So it seems there is somewhere one more function for rendering the monthly events that needs some adjustments.
Aug 20, 2014
Thank you, I'm working mainly with mothly overview. I'll try to find some solution for that as well.
Aug 20, 2014
Ok checked the source and here is the solution for the vertically rendered events (allday events and the events shown in the monthly overview). Change function 'compareDaySegments(a, b)' like this:
function compareDaySegments(a, b) {
if (a.event.sorter != null && b.event.sorter != null)
return (b.rightCol - b.leftCol) - (a.rightCol - a.leftCol) || // put wider events first
b.event.allDay - a.event.allDay || // if tie, put all-day events first (booleans cast to 0/1)
a.event.sorter - b.event.sorter; //now take the sorter
else
return (b.rightCol - b.leftCol) - (a.rightCol - a.leftCol) || // put wider events first
b.event.allDay - a.event.allDay || // if tie, put all-day events first (booleans cast to 0/1)
a.event.start - b.event.start || // if a tie, sort by event start date
(a.event.title || '').localeCompare(b.event.title); // if a tie, sort by event title
}
So if this is done in combination with the changes of here https://code.google.com/p/fullcalendar/issues/detail?id=364#c49 the calender will be ok and the events will be rendered everywhere by the event.sorter attribute.
Aug 20, 2014
Perfect, now it's working almost in all cases. I'll play with it a little bit more and find the last bugs. Thanks a lot!
Sep 20, 2014
is there a way to implement https://code.google.com/p/fullcalendar/issues/detail?id=364#c53 and https://code.google.com/p/fullcalendar/issues/detail?id=364#c49 without messing up with original fullcalendar js file.
Sep 20, 2014
What does thus mean to us non-techies??
Sep 29, 2014
following solutions from https://code.google.com/p/fullcalendar/issues/detail?id=364#c53 does not work. I'm using version 2.*. Any help will be appreciated.
Oct 1, 2014
@milo..: With v2.0.2 (that i'm currently using) it works... However you forgot to mention what exactly doesn't work ;)
Oct 12, 2014
@ti08m...: i've applied both codes and events behave the same. For example if i set higher priority on event1 I want it to stay above event2 who's priority is lower in case they overlap. Events are all full-day and at least 2 days long. I'm on v2.0.3
Oct 28, 2014
compareDaySegments is not in 2.1.1 version
Oct 29, 2014
It's pretty ridiculous that this absent functionality has been known for more than 4 years and nothing's been implemented for it. All of my events are multi-day, and most of them are multi-week, so in BasicWeek and BasicDay I just wind up with a stack of objects with no logic to how their organization. I can think of reasons to organize events by colour, title, endDate, narrowest/widest first, or just the order that they're entered into the calendar. Personally, I'm going to implement the .sorter option and just set it to the row number that the event returns in from the database. I have different queries for the different views, and if I want them sorted by Start Date, I'll just sort the database results by the column I'm using for Start Date.
Oct 30, 2014
Issue 2298 has been merged into this issue.
Nov 25, 2014
Issue 2372 has been merged into this issue.
Dec 17, 2014
https://code.google.com/p/fullcalendar/issues/detail?id=364#c53 and https://code.google.com/p/fullcalendar/issues/detail?id=364#c49 are no longer working since 2.1.1 version. You now should have a look at the compareSegs function. For exemple I wanted to sort like this : date > duration > all day > My sorter > title. So I changed the function like this : function compareSegs(seg1, seg2) { return seg1.eventStartMS - seg2.eventStartMS || // earlier events go first seg2.eventDurationMS - seg1.eventDurationMS || // tie? longer events go first seg2.event.allDay - seg1.event.allDay || // tie? put all-day events first (booleans cast to 0/1) seg2.event.sorter - seg1.event.sorter || // My Sorter (seg1.event.title || '').localeCompare(seg2.event.title); // tie? alphabetically by title } And then added a sorter attribute as in #49
Feb 9, 2015
One implementation by @pcaifeng here: https://github.com/arshaw/fullcalendar/pull/212
Mar 26, 2015
Hi! When is this feature going to be available? I personally don't like to change the default methods implemented in the lib because that way I can't use the minified version and with every update I must be carefull so that it all keeps working. A custom sort on the events is one of the few things that are missing in this awsome lib! Thanks in advance
Apr 29, 2015
This would be great. Better yet we can just allow custom sorting.
I dont remember how we get the options but you get the idea:
function compareSegs(seg1, seg2) {
return this.options.compareSegs ? options.compareSegs(seg1, seg2) :
(seg1.eventStartMS - seg2.eventStartMS || // earlier events go first
seg2.eventDurationMS - seg1.eventDurationMS || // tie? longer events go first
seg2.event.allDay - seg1.event.allDay || // tie? put all-day events first (booleans cast to 0/1)
seg2.event.sorter - seg1.event.sorter || // My Sorter
(seg1.event.title || '').localeCompare(seg2.event.title)) // tie? alphabetically by title
}
May 19, 2015
I'm hoping this will turn up as a fix soon. Even alphabetically by event title would be great. Then I could at least manage my titles to get the list right.
May 26, 2015
Issue 2486 has been merged into this issue.
Aug 1, 2015
Is this problem fixed?
Aug 9, 2015
Another bump to see if this happens this year. It's long overdue.
Aug 22, 2015
this has been released in fullcalendar v2.4.0. a new `eventOrder` setting http://fullcalendar.io/docs/event_rendering/eventOrder/
Status:
Released
|
|
| ► Sign in to add a comment |