Support

Home Forums Event Espresso Premium Calendar plugin in month view producing some items with full widths

Calendar plugin in month view producing some items with full widths

Posted: May 22, 2019 at 1:13 pm

Viewing 7 reply threads


imattination

May 22, 2019 at 1:13 pm

I’ve just installed the Calendar add-on plugin and instantly I have a problem with it that I can’t resolve.

Basically all the layouts are not performing as corrected and the events I have are at best oddly presented (see monthly calendar screenshot) and at worst unreadable (see the weekly calendar).

Now the website this is installed on has a custom theme so I thought it would clearly be down to that, so reverted to the standard Twenty Nineteen theme but its basically the same. The screenshots I have linked to are from that theme btw.

Apologies if this was something basic but I’ve had no joy searching the forum for this issue.


Josh

  • Support Staff

May 22, 2019 at 1:40 pm

Hi,

From looking at the screenshots it looks like the events need to have specific datetimes set for each time the course or session meets (instead of a single datetime that spans from the start of the course until the end of the course). This way, the calendar will clearly show which days the sessions fall on.

With regards to the week view, once those datetimes are specified, you’ll likely find that the week view will look better if it uses the basicWeek instead of agendaWeek. This can be changed in the Calendar settings Advanced Settings tab. In the Header style settings change agendaWeek to basicWeek.


imattination

May 27, 2019 at 4:28 am

Hi Josh

Thanks for the reply, how do I apply that first change you suggest for individual date times, I can’t see how in the admin interface ? You aren’t suggesting that each day is created seperately as a date time over the course of the event are you ? (This would require over 30 date times).

Thanks
Adam


Tony

  • Support Staff

May 27, 2019 at 8:38 am

You would need to edit the event and then rather than having a single DateTime, split each DateTime into the individual datetimes, there’s no option to do this automatically for you so you need to create each individual DateTime separately (or duplicate an existing DateTime and edit the dates of the newly created one)

You aren’t suggesting that each day is created seperately as a date time over the course of the event are you ? (This would require over 30 date times).

That’s correct, if you want the datetimes to display as single days you’ll need to create them individually.

Another option (although I’m not sure it will suit your use case) is to set the calendar to display datetimes that are longer than X number of days to only display on the start date.

Heres an example that does just that if a DateTime is longer than 7 days:

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

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/


imattination

May 27, 2019 at 10:54 am

Hi Tony

The problem I have with this solution is that this plugin is being applied to a site already setup with EE and with a fair few existing events and I really don’t want to have to go back to the client and tell them that to use the calendar all their data is basically invalid, and that to resolve there is a huge amount of manual work involved.

Just to be sure, the way these multi date events are spanning and breaking up the normal box monthly layout is by design, its not a quirk so to say?

Thanks


Tony

  • Support Staff

May 27, 2019 at 11:34 am

The output shown in your screenshots is by design and the calendar has always displayed the events in this way.

If you have an event that spans multiple days the calendar display that datetime over multiple days. If you have an event with multiple datetimes spanning single/multiple days each of those datetimes will be displayed as above.


imattination

May 28, 2019 at 5:10 am

I added the code from that github and it looks perfectly fine in terms of presentation now, just how I imagined it.

Is it not possible to use that custom code and then also through some other tweaks make the events duplicate for each date?

Or what about at least stating the date range on the single day that they occur ? Right now they just show a time and date of that start date, suggesting its a single event for that date, but if it could state in the titles everywhere the date range that could help.


Tony

  • Support Staff

May 28, 2019 at 5:53 am

Is it not possible to use that custom code and then also through some other tweaks make the events duplicate for each date?

Not currently, that code works on a filter that applies to a single datetime instance before its added to an array of all datetimes, meaning you can a specific datetime within the calendar but not add others to the array.

So to create duplicate datetimes you’d need access to the array of calendar datetimes constructed from the singles. You can see what I mean a little more clearly HERE (866 filters the single datetime, it’s then added to $calendar_datetimes_for_json which is then used to build the JSON output for the calendar.

Or what about at least stating the date range on the single day that they occur ? Right now they just show a time and date of that start date, suggesting its a single event for that date, but if it could state in the titles everywhere the date range that could help.

Sure, the above filter can be used to change pretty much all of the output for a specific calendar datetime so you should be able to add whatever details you prefer using that.

Viewing 7 reply threads

The support post ‘Calendar plugin in month view producing some items with full widths’ 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