7

I am currently working on Fullcalendar v4 with rrule plugin

I have this code

var calendarEl = document.getElementById('calendardemo');
var calendar = new FullCalendar.Calendar(calendarEl, {
plugins: ['interaction', 'dayGrid', 'timeGrid', 'momentTimezone', 'rrule', 'list'],
header: {
     left: 'prev,next today',
     center: 'title',
     right: 'dayGridMonth,timeGridWeek,timeGridDay'
},
editable: true,
events: [
{ // standard property
     title: 'This is sample event',
     start: '2019-12-29', 
     end: '2019-12-31'
},
{
     title: 'event with rrule plugin',
     rrule: {
          freq: 'weekly',
          interval: 5,
          byweekday: [ 'mo', 'fr' ],
          dtstart: '2019-12-29T10:30:00',
          until: '2020-12-31'
     }
}
]
});
calendar.render();

please note:

{ // this is the standard (No issues)
     title: 'This is sample event',
     start: '2019-12-29', 
     end: '2019-12-31'
}
{ // Not updating on change view
     title: 'event with rrule plugin',
     rrule: {
          freq: 'weekly',
          interval: 5,
          byweekday: [ 'mo', 'fr' ],
          dtstart: '2019-12-29T10:30:00',
          until: '2020-12-31'
     }
}

Link to a demo

Now when I drag & drop "This is sample event" then change view grid or click < > it stays updated. but when I drag & drop "event with rrule plugin" then change view grid or click < > it's not updated. it just stays where it was loaded in first load. Please help. Thanks !

Mark Salvania
  • 486
  • 3
  • 17

1 Answers1

0

You might have to add a form that would allow a user to change repeated rules when they begin to drag them. Otherwise, could you describe expected behaviour after the user drops repeated event on another date. What changes would be applied to a rule?

  • I only need those moved dates (from recurring events) to be in current position (where it was moved) when you're changing view. I just keeps back to original position – Mark Salvania Dec 19 '19 at 17:01
  • @MarkSalvania Should this event become simple event or still be recurring even after it is moved? – Matvii Hodovaniuk Dec 20 '19 at 06:11
  • Yes that is right it becomes a simple event (by storing data as ONE DAY event let's say.) I'm already good at this, BUT what I need is how it updates and renders in front end. – Mark Salvania Dec 20 '19 at 08:10