Globalization in Angular Schedule Component: Cannot read property 'trim' of undefined at Week.formatDateRange

Hi Syncfusion Support Team

We are creating a new PWA using Angular 11. Now we also want to use the scheduler, which works as far as it can. Only when we want to change the language, we get the following error message:
Cannot read property 'trim' of undefined at Week.formatDateRange

In the file of the attachment you can find the source code. If we remove the locale='de-CH' entry in the pendenzen.component.html file, then the component loads correctly.

In Vue another user had the same problem:
https://www.syncfusion.com/forums/154409/changing-language-in-scheduler-not-working-for-webpack-4-versions

Reinstalling the scheduler did nothing.

Many thanks for your support.

Kind regards,

Thomas

Attachment: angular11_code_700f04bd.zip

3 Replies 1 reply marked as answer

PN Praveenkumar Narasimhanaidu Syncfusion Team May 27, 2021 02:54 PM UTC

Hi Thomas, 

Greetings from Syncfusion support..! 

We have validated the reported problem “Cannot read property ’trim’ of undefined at Week.formatDateRange” with your shared details at our end. We let you know that the reported problem not replicated and sample working fine at our end and suspect that you might be added de culture’s cldr data instead of de-CH’s. We have prepared a working sample with ‘de-CH’ culture which can be viewed from following link. 


Kindly try the above sample, if you still face any problem please share the issue replicating sample or try to replicate the problem in above sample. 

Regards, 
Praveenkumar 


Marked as answer

TH Thomas Hoffmann May 27, 2021 09:19 PM UTC

Hi Praveenkumar,

Thank you for the quick reply. I was able to solve the problem.
They were the right files.
I had to make a production build and run it. The error only comes when I start the application in debug mode.
I am working with Visual Studio Code and started the application with ng build -o.

Thank you very much for your help.

The support case can now be closed.

Regards,

Thomas


NR Nevitha Ravi Syncfusion Team May 28, 2021 04:40 AM UTC

Hi Thomas, 

Thanks for your update. 

We are glad that the issue has been resolved at your end, please get back to use if you need any further assistance. 

Regards, 
Nevitha 


Loader.
Up arrow icon