Here is the fix

I found the problem. removeEventsByDate is too aggressive in the default mode where you just supply a date and not a second argument saying which event on that date to remove. Here is line 100 from the current version:

this.cells[cellIndex].select('.dayboxvalue').invoke('remove');

The problem with that is that it removes the entire dayboxvalue div element, yet the setPlannerValue function depends on that div still existing so it can put new p elements inside it. Rather than remove the entire dayboxvalue div if no arguments are given to removeEventsByDate we should just loop through all the p elements in that div and remove them. So I removed line 100 and added this and it works fine now:

for(var index = this.cells[cellIndex].select('.dayboxvalue p').length - 1; index >= 0; index--)
this.cells[cellIndex].select('.dayboxvalue p')[index].remove();

Hope that helps,
David

Reply

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

More information about formatting options