Support » Plugin: Events Manager » Wrong month name in calendar

  • Resolved noesiskl

    (@noesiskl)


    Hello,

    since some time (new WP and/or PHP version?) the function date_i18n displays a wrong month name in calendar view (shows the right calendar sheet but the name is one month before the current). My blog settings are: timezone = ‘Berlin’, date = ‘j. F Y’, time = ‘G:i’.

    I changed date_i18n to wp_date in

    • /wp-content/plugins/events-manager/templates/templates/calendar-full.php, line 20
    • /wp-content/plugins/events-manager/templates/templates/calendar-small.php, line 17

    to fix the issue.

    FEATURE REQUEST(?): Please replace all occurences of date_i18n with wp_date according to WP developer (This is a newer function, intended to replace date_i18n() without legacy quirks in it.)

    Thanks in advance and kind regards
    Knut

    • This topic was modified 6 months, 4 weeks ago by noesiskl. Reason: subject enhanced

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

Viewing 12 replies - 16 through 27 (of 27 total)
  • Thanks @pacc , I corrected the comments. I originally placed them after the fact and intended them to be a guide, but you’re right, I should have made them more user friendly.

    @netweblogic , you’re certainly right that this only works for a single language at a time. I haven’t tested it out with Google translator, but I would guess that it works with that. However, that’s only going to help folks who are using it already.

    But just like you mentioned previously, this is a quick and simple fix so I can move on to other tasks. Hopefully you can pinpoint the root cause and include it in a future fix. And thanks for the quick and multiple responses on this.

    Thanks @davidkryzaniak, I can confirm that your fix took care of the problem.

    @netweblogic, your suggestion of updating to $EM_DateTime->i18n did not fix our calendar widget.

    There are quite a few reports already of this problem, hopefully a permanent fix will be rolled out soon.

    https://wordpress.org/support/topic/calendar-showing-one-month-back/

    Plugin Author Marcus

    (@netweblogic)

    @davidkryzaniak You’re absolutely right, thanks! Props given in the changelog. I used UTC since it’s DST-agnostic but I think it would still work the same.

    Also, I was able to reproduce this by changing my blog timezone to -6 GMT. I had not bothered testing timezones this time around, because we had a very similar bug with grouped event lists and the monthly date headers, but the only fix was by changing date_i18n() usage to wp_date(). I only managed to fix it once seeing the problem on a Pro customer site (since on our private forums we can ask for login info).

    Thanks, everyone for your persistence on this (and @knighthawk for suggested fixes). I’ve updated the plugin dev version 5.9.9.1 with this fix which should solve both the time and language problem, it’ll be out in the next update. You can already upgrade to 5.9.9.1 just like a regular plugin update with a few extra clicks, as per these instructions.

    • This reply was modified 6 months, 2 weeks ago by Marcus.

    Hi Marcus,
    Will this 5.9.9.1 version also fix the problem of event dates being one month back in the calendar widget as raised in another thread?

    Plugin Author Marcus

    (@netweblogic)

    @francoc30 I think so, as it sounds like the same symptom

    Thanks Marcus. Indeed it is. I installed the 5.9.9.1 and it resolved the one month back issue in the calendar widget.

    May I ask a related question? My date format in WP and EM is set to Y-m-d. In the calendar widget, the header month is displayed as m-Y. Is there a way to make it Y-m?

    Plugin Author Marcus

    (@netweblogic)

    @francoc30

    Yes, that’s possible via Events > Settings > Formatting > Calendar

    Got it. Thanks Marcus.

    Hello,
    sorry to bother, but I still have this issue ;
    short code

    [events_calendar long_events=1 full=1 year=”2021″ month=”5″]

    gives

    Avr 2021

    in events-manager/templates/templates/calendar-full.php
    line 20 :

    <td class=”month_name” colspan=”5″><?php echo esc_html($EM_DateTime->i18n(get_option(‘dbem_full_calendar_month_format’))); ?></td>

    Plugin Author Marcus

    (@netweblogic)

    hello, check your theme folder under yourtheme/plugins/events-manager/templates/caledndar-full.php

    Modify it as per earlier comments, or delete that file if you didn’t modify it previously.

    thank you for your reply, but could you be more precise ?
    … lots of replies, difficult for me to synthesis the issue

    @alexandraka I’d suggest creating a new thread for exactly that reason. This reported bug is fixed in the latest update, so this topic should ideally be closed to further replies.

    If you’re still experiencing it, it’s possible you overrode our calendar template, my previous suggestion tells you to check/remedy that.

Viewing 12 replies - 16 through 27 (of 27 total)
  • You must be logged in to reply to this topic.