Support

Home Forums Event Espresso Premium EE4 event date and time on events lasting several days

EE4 event date and time on events lasting several days

Posted: June 30, 2014 at 4:40 am


Reiner Fischbach

June 30, 2014 at 4:40 am

Hi there,

if I have an event lasting several days I have a problem showing the date and time in the single event page.

Example: The event starts at 1.7.2014 at 19:00 and ends at 4.7.2014 at 11:00 the information displayed is:

1.7.2014 – 4.7.2014
19:00-11:00

this is VERY confusing.
I need something like
1.7.2014 19:00 – 4.7. 2014 11:00

How can I change this?
Thank your for the help.

Ana


Sidney Harrell

June 30, 2014 at 1:03 pm

K, made a custom function to override the default behavior and give you the datetime output you are looking for.
You can add this code to one of the following:
1 – Your theme’s functions.php file. It may get overwritten the next time you update your theme.
2 – Use this blank plugin to hold the custom function.


Sidney Harrell

June 30, 2014 at 4:05 pm

I made a screencast to help with applying a custom function to EE4:


Reiner Fischbach

July 2, 2014 at 12:55 pm

Thx – this worked fine (beside some little typing errors …).

There is a typing error and a missing space in one line. Here the corrected version.

$html .= ‘<span class=”dashicons dashicons-calendar”></span><span class=”dashicons dashicons-clock”></span>’ . $datetime->start_date( $dt_frmt ) . ‘ ‘ . $datetime->start_time( $tm_frmt ) . ‘ – ‘ . $datetime->end_date( $dt_frmt ) . ‘ ‘ . $datetime->end_time( $t_frmt );


Lorenzo Orlando Caum

  • Support Staff

July 2, 2014 at 4:53 pm

Thanks for letting us know. We’ll update the gist.


Lorenzo

The support post ‘EE4 event date and time on events lasting several days’ 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