Make Events + Calendar base events on start time and not end time

Right now when we post an event that ends at 2:30 in the morning, it shows the event on the calendar widget as being on the next day. Is there any way to have the calendar cut off the days at like 4am instead of 12am? Basically we want events that start in the evening and go past 12am to not show up on the next day in the calendar widget. Is there any way to adjust this?

  • Vaughan

    Hi @cara,

    I can't actually see anyway of achieving this without some custom code. I'm going to have to ask one of our developers to see if he can come up with a solution to this.

    I also note, you are using an older version 1.7.4, could you please update to the latest release 1.7.5 as the latest release has a few bugfixes & also a fix for a security exploit.

    Hopefully the developer should respond shortly.

    Thanks

  • Scott

    I'm still looking for the solution to this. I tried setting the calendar to start at 6:00 and end at 24:00, but it seems that if you divide the day into anything larger than two halves it just defaults to a 2 hour period. What I want to do is not have the days divided up - I want all events for that day to show in single columns.

    The only solution I have come up with was dividing the day in half and only displaying the second row - which really isn't good because any events that happen before 12:00 would not be displayed at all.

  • Jack Kitterhing

    Hi there @Cara,

    Hope you're well today and thanks for your patience on this. Sorry about the extreme delay here.

    It seems this was overlooked by the developer, I've just asked another of our developers to take a look at this.

    In the mean time, I've taken a look, but I can't see a way of getting this functioning as is required, primarily because the day is just based on the standard 24hr or 12hr time frame, so it's always going to end at midnight, rather than going into the next day.

    Hopefully the developer can confirm either way, if there is a workaround for that.

    Thank you again for your patience here.

    Kind Regards
    Jack

  • Jose

    Hi @Cara,

    Hope you are doing great today :slight_smile:

    Unfortunately, I couldn't find a way to change this without hacking the plugin core.

    You will need to replace the attached file in the following location:
    ..\wp-content\plugins\events-and-bookings\lib\class_eab_calendar_helper.php

    The code change is only in the line 83:
    This:
    $current_day_start = strtotime("{$date} 00:00");

    Is changed to this:
    $current_day_start = strtotime("+4 hour", strtotime("{$date} 00:00"));

    Please let me know how it works on your end.

    Cheers!
    Jose

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.