Unable tu use DateTimePicker - Error loading locale Italian file (Aiutatemi :-) )

Hi community, I cannot use the datepicker component cause the error below.

I tried to load the locale "it" files but I got the same error.

Anybody have a complete example and maybe the Italian json files for the datepicker?

This is a live example: https://preproduzione.zenshare.it/biblioteca/demotreeview.php


Kind regards


ej2.min.js?a=13.6.00:10 Uncaught TypeError: Cannot convert undefined or null to object

at Function.keys ()
at t.getCultureValues (ej2.min.js?a=13.6.00:10)
at t.createContentHeader (ej2.min.js?a=13.6.00:10)
at t.createContent (ej2.min.js?a=13.6.00:10)
at t.createContent (ej2.min.js?a=13.6.00:10)
at t.render (ej2.min.js?a=13.6.00:10)
at t.render (ej2.min.js?a=13.6.00:10)
at t.show (ej2.min.js?a=13.6.00:10)
at t.dateIconHandler (ej2.min.js?a=13.6.00:10)




Francesco


6 Replies

DR Deepak Ramakrishnan Syncfusion Team December 13, 2021 06:43 PM UTC

Hi Alessandro, 
 
Greetings from Syncfusion support. 
 
We request you to load the culture files as like below code and let us know the issue still get persist. Also you can refer the below documentation attached. 
 
loadCldr( 
require('cldr-data/supplemental/numberingSystems.json'), 
require('cldr-data/main/he/ca-gregorian.json'), 
require('cldr-data/main/he/numbers.json') 
require('cldr-data/main/he/timeZoneNames.json') 
); 
 
 
 
 
 
Thanks, 
Deepak R. 



AL Alessandro replied to Deepak Ramakrishnan December 14, 2021 08:08 AM UTC

Thanks very much Deepak Ramakrishnan, not I have another error: "Uncaught ReferenceError: loadCldr is not defined".


You can check at https://preproduzione.zenshare.it/biblioteca/demotreeview.php


Can you help me?





BC Berly Christopher Syncfusion Team December 15, 2021 06:09 PM UTC

Hi Alessandro, 
  
We need to import the loadCldr in the top of the page to resolve the reported issue. 
  
//Load the loadCldr from ej2-base 
import { loadCldr } from '@syncfusion/ej2-base'; 
 
declare var require: any; 
  
Regards, 
Berly B.C 



AL Alessandro December 16, 2021 05:46 PM UTC

Hi Berly, thanks for the answer.

Unfortunately we use another way, we include the big js file for syncfusion, and I cannot use loadCldr.

I use this method: https://preproduzione.zenshare.it/biblioteca/demotreeview.php (watch file main_demo.js)

This works for grid, treeview but not for datepicker. I suppose I need to include some other culture file.


Can you help me?


Bye



DR Deepak Ramakrishnan Syncfusion Team December 19, 2021 09:11 AM UTC

Hi Alessandro, 
 
We will further validate the issue and update the details within two business days (21 December 2021). 
 
 
Thanks, 
Deepak R. 



DR Deepak Ramakrishnan Syncfusion Team December 21, 2021 04:15 PM UTC

 
Hi Alessandro, 
 
Thanks for your patience. 
 
We request you to recreate the scenerio by using below sample  to reproduce the issue in our end . Hence with the provided link we couldn’t see whether the json files whether loaded or not in in Syncfusion folder .  Also using loadCldr  is the suggested way to achieve globalization feature for DateTimepicker component .So we will proceed further based on the update from your end with issue reproducing sample. 
 
 
 
Thanks, 
Deepak R. 
 
 
 
 
 


Loader.
Up arrow icon