Support » Plugin: Events Manager » Remember month in Full Calendar

  • Resolved Steve Greenham


    Hi, we have Events Manager linked to Full Calendar and it works well (if a bit slowly!)

    One issue though, if I browse through the calendar for a couple of months and then click on an event to display it, when I return to the calendar it defaults to the current month rather than the month I was viewing. This is a real pain when trying to view a lot of individual events in the future.

    I’m not sure if it is possible to have a cookie remember the last viewed month and return to it? If not, could I request this as an option? A cookie that persisted for 15 minutes would be more than sufficient.

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Stonehenge Creations


    Hi Steve,

    EM User here too 🙂
    Since your calendar page takes about 7 long seconds to load, I would suggest opening the single days in a new tab. That way, when the visitor closes that new tab, they are right back where they were, without having to wait for a new page load.

    I would avoid cookies as much as possible. Since the GDPR you have to ask permission and more and more users are using cookie blockers. 😉

    You could add the target using jQuery:
    jQuery('.fc-event').attr('target', '_blank');

    Thanks Patrick, opening the single days in a new tab is a good call but I’m not sure where I would put the jQuery? Would it be in one of the templates?

    I have had some complaints about the time the calendar takes to load and have tried to optimise using as well as installing JetPack, W3 Total Cache and Google libraries plug ins. Objectively it doesn’t take significantly longer to load the page than the embedded Google calendar it replaced (both around 4.6 seconds) but it does feel that way when clicking through month by month, where Google was much faster.

    My view is that the slower response is a small price to pay for all the benefits we gain from Event Manager, but it would be nice if it was quicker.

    Since HTML is a stateless protocol it is hard to see an alternative to using cookies to persist state in general – its often a cookie that keeps you logged in to a site. If people block them then they have to live with the issues that result. I don’t think the privacy advocates who came up with the cookie consent directive considered this sufficiently and should have distinguished between session cookies and trackers.

    Stonehenge Creations


    That is a whole different discussion – I use a cookieless domain. I don’t care about tracking etc. But I guess that depends on your/ones business. 😉 I don’t really have returning customers (unique city tours. If you’ve done it, you won’t do it twice. LOL)

    The easiest is to wrap the jQuery in a snippet and place it in your theme’s functions.php

    function em_open_in_new_tab() {
    ?>jQuery('.fc-event').attr('target', '_blank');<?php
    add_action('wp_footer', 'em_open_in_new_tab');

    Speeding up your website is a profession on its own. 😉 Sure, there some good plugins out there, but if you’re anything like me, “things can always be better”. LOL. GT Metrix is one of the best testers out there, indeed. I did a test on your site just now and it gives you lots of great tips. Good luck! 🙂

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Remember month in Full Calendar’ is closed to new replies.