javascriptcalendarfullcalendarfullcalendar-4rrule

FullCalendar rrule "Until" not being inclusive


The spec for the rrule plugin says that Until dates are Inclusive. I'm not seeing that. Am I mis-reading?

https://github.com/jakubroztocil/rrule

If given, this must be a Date instance, that will specify the limit of the recurrence. If a recurrence instance happens to be the same as the Date instance given in the until argument, this will be the last occurrence.

I have this test:

calendaring.testRecur = function(dayOrWeek){
var rruleDataWeekly = {
    freq: 'WEEKLY',
    interval: 1,
    byweekday: [ 'MO', 'WE', 'FR' ],
    dtstart: '2019-11-01T10:30:00',
    until: '2019-11-15'
};
var rruleDataDaily = {
    freq: 'DAILY',
    interval: 1,
    count: 5,
    dtstart: '2019-11-04T09:30:00',
};

var rruleData = dayOrWeek === "day" ? rruleDataDaily :  rruleDataWeekly;
var title = dayOrWeek === "day" ? "Test Daily" :  "Test Weekly";

var newEvent = {
    title: title,
    duration: "00:45",
    rrule: rruleData
};
calendaring.calendar.addEvent(newEvent);};

And this is my config for the calendar:

 calendaring.calendar = new Calendar(calendarEl, {
    events: '/myurl',
    plugins: ['rrule', 'interaction', 'dayGrid', 'timeGrid', 'bootstrap', 'list'],
    header: {
        left: 'prev,next today',
        center: 'title',
        right: 'dayGridMonth,timeGridWeek,timeGridDay, listDay',
    },
    defaultView: 'timeGridWeek',

    slotDuration: '00:15',
    slotLabelInterval: '01:00',
    minTime: '06:00',
    maxTime: '21:00',
    allDaySlot: false,
    slotEventOverlap: false,
    buttonText: {
        today: 'Today',
        month: 'Month',
        week: 'Week',
        day: 'Day',
        list: 'List',
    },
    themeSystem: 'bootstrap',
    editable: true,
    selectable: true,
    droppable: true,
    fixedWeekCount: false,
    hiddenDays: [ 0, 6 ],
    eventLimit: 6,

});
calendaring.calendar.render();};

Solution

  • The issue was I didn't have a time associated with my UNTIL. So, it assumes midnight, not 23:59:59. Phew. Thanks @ADyson for the help.