Reputation: 904
I have events which are recurring weekly but the recurring events are displaying before current week as well. Can the recurring events be rendered only from current week and beyond? Currently Im using the following code to display my recurring week but it is not working.
My recurring event is as
events: [
id: 1,
title: Hello,
start: 2016-01-26T02: 00: 00.000-07: 00,
end: 2016-01-26T05: 30: 00.000-07: 00,
allDay: false,
eventType: availability,
rendering: background,
color: black,
dow: [1,4]
],
And My code to attempt my criteria is
eventRender: function(event, element) {
return (event.start>=moment().startOf('week'));
}
Upvotes: 1
Views: 154
Reputation: 75
I think you should use moment property,this should help:
eventRender: function(event, element) {
if(((moment(event.eventDate))>($('#calendar').fullCalendar('getDate').endOf('week'))) {
element.hide();
}
}
Upvotes: 1