Calendar Views when creating events on 31st recurring


When you attempt to create a recurring event on the 31st of every month, the various views don’t display properly.

How To Repeat:
Create a recurring event as follows:

  1. Give it a name
  2. Set the recurrences to “monthly”
  3. select “repeat [31] day every [1] month”
  4. select the event to end “After [12] occurrences”

Look at the daily/weekly/monthly/agenda views for the event (screenshots attached)

  • in the daily view, no occurrence will be displayed for “feb 31st” nothing on the 28th, nothing on march 3rd
  • in the weekly view, No occurrence will be displayed for “feb 31st” nothing on the 28th, nothing on the 3rd of march
  • In the monthly view for march, events are displayed on March 3rd (feb’s occurrence) and April 3rd (march’s occurrence). Nothing is displayed on March 31st (when the event should be displayed. If you move forward to april, events are displayed on March 31st and May 1st (as expected).
  • In the agenda view, an occurrence is displayed for March 3rd (feb’s occurrence) and all subsequent occurrences are displayed on the 3rd of the month.

technical details:
the issue appears to be in the dhtmlxscheduler_recurring.js lines 653 to 658. They create a new date to represent the next occurrence, set the month to be the month of the current occurrence plus 1 (or whatever you set to be the months between recurrences) but don’t check to see that would push it into the next month. So jan 31 becomes feb 31 which is really march 3rd.

the while loop that says td =, 1, ev.rec_pattern); is causing the next occurrence to be calculated from the previous occurrence, and not the baseline for the series, which causes all events to be thrown off once the first one is out-of-sync (stupid February) :slight_smile:


I have raised a support ticket to track this issue: JVP-364905