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


when i set locale to fa or ar i got this error.. why ca persian.json not working

Uncaught TypeError: Cannot convert undefined or null to object
    at Function.keys (<anonymous>)
    at DateTimePickerComponent.CalendarBase.getCultureValues (calendar.js:353)
    at DateTimePickerComponent.CalendarBase.createContentHeader (calendar.js:396)
    at DateTimePickerComponent.CalendarBase.createContent (calendar.js:335)
    at DateTimePickerComponent.Calendar.createContent (calendar.js:2436)
    at DateTimePickerComponent.CalendarBase.render (calendar.js:192)
    at DateTimePickerComponent.Calendar.render (calendar.js:2307)
    at DateTimePickerComponent.DatePicker.show (datepicker.js:1238)
    at DateTimePickerComponent.DateTimePicker.show (datetimepicker.js:529)
    at DateTimePickerComponent.DatePicker.dateIconHandler (datepicker.js:635)

6 Replies

CI Christopher Issac Sunder K Syncfusion Team June 7, 2019 12:40 PM UTC

Hi Arash, 

Thank you for contacting Syncfusion support. 

While using json files in react application(using TSX), it throws lint error from json files. So, We have checked some articles and blog about this issue but all the solutions are suggested based on jsx file. And, It doesn’t works in tsx. 

We have created an issue task in react repository in github. Here is the task for you reference, 

Based on the update from this repo, we can check further in our end and get back to you. We appreciate your patience until then. 


AA Arash Asadzadeh June 7, 2019 01:34 PM UTC

Thanks christo
All json files working properly but when i set locale to 'fa' i got error...ca-persian.json not working

GB Gene Black June 10, 2019 03:34 PM UTC

this is a clue that I found, not sure how to apply it to the grid calendar, but here is what the calendar says it needs for islamic dates

btw: I did see if I did not pass a skeleton for the format (i.e. {type: 'date', skeleton: 'short'}) it seemed to work

GB Gene Black June 10, 2019 03:54 PM UTC

on your ColumDirective, this seems to work using a skeleton :

format={{ type: 'date', skeleton: 'short', calendar: 'persian'}}

in the code it assumes {calendar: 'gregorian' } unless the calendar option is present in the format

GB Gene Black June 10, 2019 04:21 PM UTC

Never mind, setting the calendar option only gets you through the grid display issues with the skeleton format, it still throws an error in the calendar when accessing the date picker.

Looks like the embedded calendar does not have a reference to the correct cldrData at ej2-calendars/src/calendar/calendar.js line #262 and it is still defaulting to gregorian date.

PS Pavithra Subramaniyam Syncfusion Team June 13, 2019 10:37 AM UTC

Hi Arash, 

Thanks for your update. 

We have tried to reproduce the issue at our end but we need some more details which will be more helpful for us to provide an appropriate solution. So please shar the below details. 

  1. Share the Grid code example.
  2. Share the Syncfusion version.
  3. Share the full stack trace of the issue.
  4. Share the screenshot/video demo of the issue
Pavithra S. 

Live Chat Icon For mobile
Up arrow icon