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 'parentElement') causes by custimisation recurrenceEditor.frequencies

Hi guys

Few weeks ago I write this on your forum - 180110 , is about customization of Recurrence Editor.
I those time I was using Scheduler v19.4, and everything was fine.

Yesterday I updated Scheduler to v20.4 the very last one ( I also tried all other v20.4 with same result)  and I got strange error.

Uncaught TypeError: Cannot read properties of null (reading 'parentElement')

Screenshot 2023-03-02 at 12.28.17 pm.jpg

Screenshot 2023-03-02 at 12.28.32 pm.jpg

After a day long searching for where is the error, I found that this custom line is why is this happened: 
scheduleObj.eventWindow.recurrenceEditor.frequencies = ['none''daily''weekly'];

I also uploaded two files for inspection, main scheduler file and function what change the editor


Attachment: files_ddb2b329.zip

7 Replies

SI Sinisa March 2, 2023 02:07 AM UTC

Also for you convenience .

From developer tools:

Uncaught TypeError: Cannot read properties of null (reading 'parentElement')

at FormValidator.getErrorElement (form-validator.js?68c5:679:34)

at FormValidator.validateRules (form-validator.js?68c5:546:1)

at FormValidator.validate (form-validator.js?68c5:201:1)

at EventWindow.eventSave (event-window.js?b7e0:1170:1)


From form-validator.js file

line 677

// Get error element by name

FormValidator.prototype.getErrorElement = function (name) {

// line bellow

this.infoElement = select(this.errorElement + '.' + this.errorClass, this.inputElement.parentElement);

if (!this.infoElement) {

this.infoElement = select(this.errorElement + '.' + this.errorClass + '[for="' + name + '"]', this.element);

}

return this.infoElement;

};



RV Ravikumar Venkatesan Syncfusion Team March 3, 2023 09:44 AM UTC

Hi Sinisa,


We checked your reported problem in the below sample and confirmed your reported problem “Cannot read properties of null (reading 'parentElement')” as a bug and logged the defect report. The fix for this defect will be included in our weekly patch release, which is expected to be rolled out by the mid of March 2023. You can track the status of the fix at the following link:


Sample: https://stackblitz.com/edit/ej2-js-schedule-recurrence-frequency-and-end-type-djybea?file=index.html,index.js

Feedback: https://www.syncfusion.com/feedback/41562/facing-issue-while-customizing-the-recurrence-editor-repeat-type-option-in-the


Disclaimer: The inclusion of this solution in the weekly release may change due to other factors including but not limited to QA checks and works reprioritization.


Regards,

Ravikumar Venkatesan



SI Sinisa March 3, 2023 09:55 AM UTC

OK thanks,

Nice to know that will be fixed.

Cheers,



RV Ravikumar Venkatesan Syncfusion Team March 6, 2023 12:55 PM UTC

Sinisa,


You are welcome. We will let you know once the fix for the issue will be included.



RV Ravikumar Venkatesan Syncfusion Team March 8, 2023 01:05 PM UTC

Sinisa, The fix for the issue “a script error while customizing the recurrence editor repeat type option in the Schedule editor” has been included in our weekly release 20.4.53. Upgrade to the latest version to resolve the issue.


Release notes: https://ej2.syncfusion.com/react/documentation/release-notes/20.4.53/?type=all#schedule

Sample: https://stackblitz.com/edit/react-32ou8q?file=index.js



SI Sinisa March 9, 2023 07:02 AM UTC

Hi Ravikumar,

Thank you, I can confirm that this bug  has been squashed  :)




RV Ravikumar Venkatesan Syncfusion Team March 10, 2023 05:05 PM UTC

Sinisa,


You are welcome. Let us know if you need any other assistance.


Loader.
Live Chat Icon For mobile
Up arrow icon