We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Cannot read properties of null (reading 'parentNode')

Getting error for ScheduleComponent after adding the data in today selection popup open and after navigating to week and opening the  popup open 

for 

<RecurrenceEditorComponent id='RecurrenceEditor' frequencies={this.frequencies} value={this.recRule} ref={t => {
                if(t !=null){
                  this.recObject = t
                }


if I remove the RecurrenceEditorComponent I don't see the issue but I need the  RecurrenceEditorComponent please let me know how can I resolve this issue.


5 Replies

RV Ravikumar Venkatesan Syncfusion Team August 1, 2022 04:22 PM UTC

Hi Deera,


Greetings from Syncfusion support.


We have validated your query “Cannot read properties of null (reading 'parentNode')” at our end. Based on your shared details we suspect that you customizing the recurrence editor rendered on the editorTemplate on the popupOpen event of the Schedule if the recurrence editor is present in the editor window when the popupOpen event is triggered. We suspect that the recurrence editor element was not present when the popupOpen event triggered that why you facing the problem. We have prepared a working sample for your reference. Kindly try the shared sample and let us know if the shared sample meets your requirement.


Sample: https://stackblitz.com/edit/ej2-react-schedule-editor-template-recurrence-editor?file=index.js


If you still facing the problem kindly share the below details it will help us to provide the solution for your problem earlier.

  • Share an issue reproducing video.
  • Reproduce the problem in our shared sample or
  • Share a simple issue reproducing sample if possible.


Regards,

Ravikumar Venkatesan



DE deera August 1, 2022 05:50 PM UTC

Hi  Ravikumar Venkatesan,


I added the video and the whole component file calendar.js


Please let me know what should be the solution.


Attachment: Parent_Node_7259974a.zip


RV Ravikumar Venkatesan Syncfusion Team August 2, 2022 07:01 PM UTC

Hi Deera,


We have tried to reproduce the problem based on your shared details at our end. But, we are unable to reproduce the problem on our end. We have prepared a sample for your reference.


Sample: https://stackblitz.com/edit/ej2-react-schedule-editor-template-with-recurrence?file=index.js


Kindly check the shared sample and if you still facing the same problem share the below details it will help us to provide the solution for your problem earlier.

  • Reproduce the problem in our shared sample or
  • Share a simple issue reproducing sample if possible.

                                                                                                                                                                                                                                           

Regards,

Ravikumar Venkatesan


Attachment: ej2reactscheduleeditortemplatesample_c759c592.zip


DE deera August 5, 2022 03:22 AM UTC

The below div is missing on the opening of popup 2nd time after adding the data


<div class="e-footer-content">

<button type="button" class="e-control e-btn e-lib e-event-delete e-flat e-disable" data-ripple="true">Remove</button>

<button type="button" class="e-control e-btn e-lib e-primary e-event-save e-flat" data-ripple="true">Add</button>

<button type="button" class="e-control e-btn e-lib e-event-cancel e-flat" data-ripple="true">Cancel</button>

</div>




RV Ravikumar Venkatesan Syncfusion Team August 5, 2022 04:33 PM UTC

Hi Deera,


We have validated your reported problem based on your details at our end. We suggest you do the following things and let us know if they resolved the reported problems. Remove the properties set to the Recurrence editor render without setting up any properties to the Recurrence editor and check whether the reported problem persists or not. In the popupClose event of the Schedule set the recurrenceEditor as null as shown in the below code snippet and let us know whether the reported problem is resolved or not.


  onPopupClose(args) {

    if (args.type === "Editor") {

      this.scheduleObj.eventWindow.recurrenceEditor = null;

    }

  }


Regards,

Ravikumar Venkatesan


Loader.
Up arrow icon