• Resolved hemligg

    (@hemligg)


    The thing is that we have just started to use the plugin and immediately we get a report from a user that get the calendar messed up. She get the calendar displayed Sunday to Saturday. But the days are in the title rows are displayed MONDAY to SUNDAY. Resulting in that today (Monday 14th) are displayed as Tuesday the 14th.

    See this screenshot from the user:
    https://ibb.co/myrVybk

    I have not been able to replicate this issue on any of the two phones I have had available. I have a OnePlus 12 and a iPhone 13. Tried different browsers but it looks correct for me. But apparently not for all users. The user reporting the issue is an Android phone with Chrome browser.

    I think this issue previously has been reported but not solved in this thread:
    https://www.ads-software.com/support/topic/calendar-dates-on-mobile-not-displayed-correctly/

Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter hemligg

    (@hemligg)

    If you have a hard time seeing the issue on this screenshot I provided I can point out that the box for Monday 7th is blank and the 7 is put on Tuesday and 8 on Wednesday and so on.

    We have had another user reporting this issue now. This time the user used Edge on a pc. But he got it right when checking the same thing on his phone.

    Plugin Support saadali2905

    (@saadali2905)

    Hi Hemligg,

    Hope you are well.

    We will try to reproduce the issue and will update you accordingly.

    Regards

    Plugin Support saadali2905

    (@saadali2905)

    Hi Hemligg,

    Can you please shatre the URL of he site with us.

    Thread Starter hemligg

    (@hemligg)

    Well we have solved the issue on our site by override the file jquery.eventCalendar.min.js in our child theme to force the the calender to always be generated as a Monday-to-Sunday-calendar.

    This was done by replacing the following code:
    for (n.startWeekOnMonday && (w = dt.getDay() - 1), 0 > w && (w = 6), C = w; C > 0; C--) { u.push('<li class="eventCalendar-day eventCalendar-empty"></li>'); }

    with the following code:
    // Adjust to always start on Monday
    if (n.startWeekOnMonday) { w = (w === 0) ? 6 : w - 1;
    }
    for (C = w; C > 0; C--) {
    u.push('<li class="eventCalendar-day eventCalendar-empty"></li>');
    }

    We also increased the default limit of the number of events listed below the calendar from 4 to 30. But that was another issue. ??

    The issue of the calendar being generated wrongly in some cases was something we never were able to replicate ourselves but got reports about from users. But as we never need to have the calendar in any other way than Monday to Sunday we could solve the issue without solving the real issue.

    But I hope you got some clues from this.

    Plugin Support saadali2905

    (@saadali2905)

    Hi Hemligg,

    Thanks for your suggestion. We will look over it.

    Regards

    Thread Starter hemligg

    (@hemligg)

    Well it seems the fix didn’t work after all. The users that experience the issue reports the issue remain. So I’m trying another fix now. I’ll get back to you if that solves the problem.

    Thread Starter hemligg

    (@hemligg)

    Well it turned out it was a css issue and not a javascript issue.

    I added the following css code and that seemed to have solved the issue:

    /* Ensure that every day has consistent borders */
    .sep-page .sep-calendar .eventCalendar-wrap .eventCalendar-slider .eventCalendar-monthWrap .eventCalendar-daysList.eventCalendar-showAsWeek .eventCalendar-day {
    display: inline-block;
    width: calc(100% / 7); /* Each day takes 1/7th of the row */
    box-sizing: border-box; /* Ensure padding/border is included in the width */
    border-right: solid 1px #ececec; /* Add right border to separate days */
    border-bottom: solid 1px #ececec; /* Add bottom border */
    }

    /* Ensure that the last day of the week doesn't have a right border */
    .sep-page .sep-calendar .eventCalendar-wrap .eventCalendar-slider .eventCalendar-monthWrap .eventCalendar-daysList.eventCalendar-showAsWeek .eventCalendar-day:nth-child(7n) {
    border-right: none; /* No right border for Sunday */
    }

    /* Add a top border to the second row to ensure separation */
    .sep-page .sep-calendar .eventCalendar-wrap .eventCalendar-slider .eventCalendar-monthWrap .eventCalendar-daysList.eventCalendar-showAsWeek .eventCalendar-day:nth-child(n+8) {
    border-top: solid 1px #ececec; /* Add top border for the second row */
    }

    /* Ensure that the first day of the week (Monday) starts with a clean left border */
    .sep-page .sep-calendar .eventCalendar-wrap .eventCalendar-slider .eventCalendar-monthWrap .eventCalendar-daysList.eventCalendar-showAsWeek .eventCalendar-day:nth-child(7n+1) {
    border-left: solid 0px #ececec; /* Remove left border for Monday */
    }

    .sep-page .sep-calendar .eventCalendar-wrap .eventCalendar-slider .eventCalendar-monthWrap .eventCalendar-daysList.eventCalendar-showAsWeek .eventCalendar-day {
    width: calc(100% / 7); /* Ensure each day takes 1/7th of the row */
    min-width: 14%; /* Fallback for older browsers */
    box-sizing: border-box; /* Include padding/border in the width calculation */
    }

    /* Ensure the list container does not overflow */
    .sep-page .sep-calendar .eventCalendar-wrap .eventCalendar-slider .eventCalendar-monthWrap .eventCalendar-daysList {
    overflow: hidden;
    }

Viewing 7 replies - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.