Okay
  Public Ticket #3403768
Recurring events display the wrong date
Closed

Comments

  •  1
    foodtrucksromania started the conversation

    Hello,

    I have some problem with "Recurring events":

    1. In Map View they display the wrong date. The always show the 1st of the month (other views work fine).

    2. I have a calendar with [stachethemes_ec upcoming_only=1] added. In this calendar recurring event don't show at all in Map View (other views work fine).

    You can see/test here.

  •  783
    Zhivko replied

    Hi,

    1. If the event is repeated the map view will display event recurrence that is closest to "today".

    2. Upcoming only filter seems to work for me?

    1514135911.png



    Stachethemes Developer

  •  1
    foodtrucksromania replied

    1. it doesnt show closest to 'today' it shows the first of the month. all of my recurring July events will have the same date, 1st july 2023 shown on "Map view" for the whole month. it doesnt care if some events are recurring daily or just on weekends. This may confuse the users thinking it's a Past event since it shows "1 July 2023". Can it show the 'today' date or the correct date?

    2. recurring events don't appear on map with upcoming filter, was the problem. the filter works fine for upcoming events in general, but does not display any recurring events that are also 'upcoming' next day/week, not even with a wrong date, like in the 1. case

  •  783
    Zhivko replied

    I apologize; you are correct. The behavior of the getNearestEvents function is indeed a little off when it comes to the current month.

    In the map view, it searches for events that are closest to the 1st of the month, and that's fine unless we're specifically looking for events in the current month. Therefore, even though today is the 3rd, it still searches for events that are near the 1st of the month, which is why it shows events that are on the 1st of the month.

    I have made a slight change to the code that will rectify this problem.

    ---

    Unzip the file events.min.zip.

    Inside is file events.min.js.

    Please the file in  

    / stachethemes_event_calendar / assets / js / background / worker / 

    folder and override the old events.min.js file if asked.

    Clear your browser cache for your calendar page (CTRL + F5) on Chrome and let me know of the outcome.

    If you don't know how to replace the file I will need wp-admin access or ftp to the calendar folder and I will do it for you.


    Attached files:  events.min.zip


    Stachethemes Developer