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')
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
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;
};
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:
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
OK thanks,
Nice to know that will be fixed.
Cheers,
Sinisa,
You are welcome. We will let you know once the fix for the issue will be included.
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
Hi Ravikumar,
Thank you, I can confirm that this bug has been squashed :)
Sinisa,
You are welcome. Let us know if you need any other assistance.