Displaying full calendar events in daily notes according to the order in which they start

What I’m trying to do

Hi! Most recently, I installed the Full Calendar plugin and configured it to record events in daily notes. Unfortunately, events are added to the note in the order they were created, whereas I would like to see them sorted by their start date.

I will give screenshots for greater clarity:

This is what events look like in the Full Calendar display (events are numbered according to the order in which they were created):

events are numbered according to the order in which they were created

This is how they are displayed in my daily note. That is, each new event is added to the top of the list, regardless of its start time:

This is how events are added now

I would like the events to be arranged according to the order of their beginning, that is, as follows:

This is how I would like events to be added

Things I have tried

I think this is quite an obvious thing and such behavior must have already been implemented by someone. However, all my searches related to the settings of the Full Calendar plugin itself, as well as other plugins capable of sorting lists by certain elements, did not bring results.

I also tried to implement such a display of tasks through dataview, as well as through embedding the calendar itself in a note, but I am not familiar with the syntax of JS, so I also had to abandon this idea.

I will be glad of any suggestions. Thank you in advance!

1 Like


I was wondering the same. It seems rather obvious to me too, but I’ve noted that the demo GIF on GitHub shows the same problem so I suppose there must be a good reason. Still I’m surprised that nobody raised the issue or made it a feature request, despite there being requests for customization of inline events. Maybe something eludes us that is obvious to everyone else.

It’s been a few weeks since your post. Did you find a way since?

Here is a possible workaround:

let targetDate = "2023-08-15"; // replace with {{date}} placeholder in daily note

let pages = dv.pages()
  .where(p => p.file.path.startsWith(`calendar-path/${targetDate}`))
  .sort(b => b.startTime);

let events = pages.map(p => `- ${p.startTime}-${p.endTime} — ${p.title}`).join("\n");



edit: updated code

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.