FullCalendar rrule "Until" 不包含在内

FullCalendar rrule "Until" not being inclusive

rrule 插件的规范说直到日期是包含在内的。我没有看到。我看错了吗?

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.

我有这个测试:

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);};

这是我的日历配置:

 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();};

问题是我没有与我的 UNTIL 关联的时间。因此,它假设午夜,而不是 23:59:59。呸。感谢@ADyson 的帮助。

您可以使用下面的代码显示一天、每天、每周、每两周和每月 事件,并在鼠标悬停事件上显示工具提示。

在此示例中,您可以看到我们如何在 FullCalendar.

中设置 rrule

访问这里-