Event Calendar: Past events sorting and filtering issues fixed

Some issues have been fixed in our Event Calendar app :hammer_and_wrench:

Past events sorting

Previously, in layouts with pagination (List, Grid, Masonry), the most recent past events appeared at the bottom. Now, they show up at the top, in the same order as in the configurator :slightly_smiling_face:


Filtering issue

Previously, if a user filtered applied the Event Type filted and only past events existed, the widget showed a “No events” message but kept the “View Past Events” button active.

Now, it automatically switches to the past events page for easier access :slightly_smiling_face:


Back to Changelog →

3 Likes

it is not.

2 Likes

Hi there, @K_F and welcome to the Community :waving_hand:

Do I get it right that you’d like to show past events right away, rather than clicking on the Previous events button?

If this is the case, please add this code to the Custom JS field on the Settings tab of your widget’s settings:

function listener(selector, callback) {
  const firstTarget = document.querySelector(selector);
  if (firstTarget) {
    return callback(firstTarget);
  }

  const observer = new MutationObserver((_, observer) => {
    const targetNode = document.querySelector(selector);
    if (targetNode) {
      observer.disconnect();
      callback(targetNode);
    }
  });
  observer.observe(document.body, { childList: true, subtree: true });
}

listener(".eapp-events-calendar-layout-container", (container) => {
  const isError = container.querySelector(".eapp-events-calendar-error-text");
  const prevButton = container.querySelector(
    ".eapp-events-calendar-layout-pagination > button:first-child",
  );

  if (isError && prevButton) {
    prevButton.click();
  }
});

In case I misunderstood you, please describe your issue in more detail :slightly_smiling_face:

2 Likes

Thank you so much!

2 Likes

Great, you’re always welcome!

By the way, we’re currently working on the opportunity to display past events on the same page with the upcoming events (like it was before the update). Please upvote this idea to receive a notification once the feature is released :slightly_smiling_face: - Toggle for past events display: show under upcoming events or on Previous events page

1 Like