How to show end date on Events Booking - Upcoming events or event menus

  • Lionel Charrier
  • Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
6 years 11 months ago #115684 by Lionel Charrier
I have events that run over several day such as a Training Session. I would like to display the Start-date and the End-date of the event in order to see the event duration easily without been forced to click on the event to see details.

I imagine this can be done by customizing css, but I do not know how and where to do it.

Has anyone encountered such requirement and found a solution ?

Kind Regards

Please Log in or Create an account to join the conversation.

  • Tuan Pham Ngoc
  • Away
  • Administrator
  • Administrator
More
6 years 11 months ago #115687 by Tuan Pham Ngoc
Hi

You will need to modify the layout, not css. Depend on the layout you are using (default, improved), you will have to modify code in the related file:

- modules/mod_eb_events/tmpl/default.php
- modules/mod_eb_events/tmpl/improved.php


Just use code below in the position you want to display event end date and it should work as expected
Code:
echo JHtml::_('date', $row->event_end_date, $config->event_date_format, null);

Please Log in or Create an account to join the conversation.

  • Lionel Charrier
  • Topic Author
  • Offline
  • Elite Member
  • Elite Member
More
6 years 11 months ago - 6 years 11 months ago #115800 by Lionel Charrier
Thank you, it is working.

I have tried first on modules/mod_eb_events/tmpl/default.php by adding two lines after line
Code:
echo JHtml::_('date', $row->event_date, $config->event_date_format, null);

The first added line is just to have a space between the 2 dates.
Code:
echo (' '); echo JHtml::_('date', $row->event_end_date, $config->event_date_format, null);
I have named that file default-start-end-date.php so that it will not be overwritten at updates.
Last edit: 6 years 11 months ago by Lionel Charrier. Reason: Typo and status

Please Log in or Create an account to join the conversation.

  • Tuan Pham Ngoc
  • Away
  • Administrator
  • Administrator
More
6 years 11 months ago #115809 by Tuan Pham Ngoc
Great to hear that you have it works.

Please Log in or Create an account to join the conversation.

Moderators: Tuan Pham Ngoc