Support

Home Forums Event Espresso Premium Event espresso calendar show events only on their first day

Event espresso calendar show events only on their first day

Posted: February 16, 2022 at 11:32 am

Viewing 3 reply threads


pathwise

February 16, 2022 at 11:32 am

I have my event espresso calendar here https://nrtraininggroup.com/schedule/

It looks like this https://ibb.co/JzFc7sJ

The events that span multiple days are shown all the days that the event is planned for, however I am looking for a way to only show the events on the first day.

Something more along the lines of this:

https://ibb.co/d5D8x45

I got started on this by doing a little bit of CSS to modify the display, however it’s full of problems.

.fc-event, .fc-event.fc-event-end {
  display: none;
}

.fc-event.fc-event-start {
  display: block;
  width: 175px !important;
}

Basically that gives a start an looks like this: https://ibb.co/Gdg92HV

However, it appears that there are lots of automatically defined tops and heights defined via JavaScript to determine how to display this calendar. Which means most likely if I continue down this route I would also need to use jQuery to determine and override those tops and heights.

Before I continue down this path, I was wondering if there were any other suggestions on how I might accomplish this in an easier fashion.


Tony

  • Support Staff

February 17, 2022 at 8:26 am

Hi there,

Yes there is a much easier way, using a snippet:

https://github.com/eventespresso/ee-code-snippet-library/blob/master/addons/eea-calendar/tw_ee_long_datetimes_end_date_equals_start.php

Add that snippet of code to the site and it will set the end date to be equal to the start date if the duration is 7 days or more. You can change how many days it needs to be before this triggers on Line 10.

You can add that to a custom functions plugin on your site, we have some documentation on creating one here:

https://eventespresso.com/wiki/create-site-specific-plugin-wordpress-site/


pathwise

February 17, 2022 at 10:17 am

Beautiful, thank you!


Tony

  • Support Staff

February 17, 2022 at 10:51 am

You’re most welcome.

Viewing 3 reply threads

The support post ‘Event espresso calendar show events only on their first day’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso