Sp-dev-fx-webparts: React-Calendar not loading single event to be edited

Created on 18 Sep 2019  路  7Comments  路  Source: pnp/sp-dev-fx-webparts

Category

  • [ ] Question
  • [x] Bug
  • [ ] Enhancement

@joaojmendes

When I run the React-Calendar webpart in the workbench on my dev site, I can create new single Event but when I go to edit the event, the panel doesn't load.

image

As far as I can tell, the await it tries to return for this.returnExceptionRecurrenceInfo(event.RecurrenceData); in src/controls/Event/event.tsx.

image

The promise then tries to find the occurrence pattern. Since there is no occurrence, the promise then returns an error.

image

If the event has any occurrence, even a single day, the edit panel will load. It only occurs in a single Event.

This may be a simple fix, and I will try an suggestions posted. I'll also keep looking into it and will let you know if I find anything.

Thanks

Most helpful comment

I changed the line to this:
let keys = recurrenceInfo !== null ? Object.keys(recurrenceInfo.recurrence.rule[0].repeat[0]) : [];

Is that a valid fix or is there another suggestion? Otherwise the issue can be closed.

Thanks

All 7 comments

Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.

I changed the line to this:
let keys = recurrenceInfo !== null ? Object.keys(recurrenceInfo.recurrence.rule[0].repeat[0]) : [];

Is that a valid fix or is there another suggestion? Otherwise the issue can be closed.

Thanks

i can confirm this change has worked for me as well. line 817 of event.tsx

I changed the line to this:
let keys = recurrenceInfo !== null ? Object.keys(recurrenceInfo.recurrence.rule[0].repeat[0]) : [];

Is that a valid fix or is there another suggestion? Otherwise the issue can be closed.

Thanks

I handled this by checking recurrence value. If it was an empty string I set state to showRecurrenceSeriesInfo: false, this triggers the default new item view with the switch to enable recurrence. https://github.com/kenhansen01/sp-react-calendar/blob/master/src/controls/Event/event.tsx (line 356 or so)

I changed the line to this:
let keys = recurrenceInfo !== null ? Object.keys(recurrenceInfo.recurrence.rule[0].repeat[0]) : [];

Is that a valid fix or is there another suggestion? Otherwise the issue can be closed.

Thanks

Its Working for me as well in chrome but not working in ie if anybody has idea pls let me know

This actually fixed my problem -- thanks!

@jonesron it looks like you solved this issue.

I'll go ahead and mark is as closed, but feel free to re-open it if you need more help with this.

Was this page helpful?
0 / 5 - 0 ratings