Fix calendar list upcoming items

parent 8bc41d1d
......@@ -5,9 +5,12 @@ class ListView extends FullCalendar.View {
skeleton.classList.add('accordion', 'bordered');
const locale = this.dateEnv.locale.codeArg;
const events = Object.values(eventStore.instances);
events.sort(function (a, b) {
const now = new Date();
const events = Object.values(eventStore.instances)
.filter(function (value) {
return value.range.end > now;
})
.sort(function (a, b) {
return a.range.start < b.range.start ? -1 :
a.range.start > b.range.start ? 1 : 0;
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment