Jack Chang
Joined 6/14/2017
Jack Chang said over 7 years ago on FullCalendar Events and Scheduling :

I  just downloaded  and installed your example from https://github.com/driftingruby/042-fullcalendar and seems it has the same issue I have encountered.

To reproduce the issue:

1.  create an new event or update (either edit or drag&drop) an existing event. (everything is good so far)

2 . click on next month button, then click to go back to current month

3. you will see two duplicate events you just created/updated

Any clue?


Jack Chang said over 7 years ago on FullCalendar Events and Scheduling :

NVM, I found the problem in  https://github.com/driftingruby/042-fullcalendar.

In app/views/events/create.js.erb and  app/views/events/update.js.erb

$('.calendar').fullCalendar(

 'renderEvent',

  $.parseJSON("<%=j render(@event, format: :json).html_safe %>"),

  true   //  <-----

);

the 'stick' atttibute for  'renderEvent'  method  should be set to false