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
close icon

Schedule localization: Uncaught TypeError: Cannot convert undefined or null to object

The scheduler localization is missing from the localization json files. The below code is working with default locale, but not for any custom locale.

My razor code:

@Html.EJS().Schedule("scheduler").Render()

My script:

<script>
  var ajax = new ej.base.Ajax('/hu.json', 'GET', true);
  ajax.onSuccess = function (value) {
    value = JSON.parse(value);
    ej.base.L10n.load(value);
    ej.base.setCulture("hu");
  };
  ajax.send();
</script>

My error:

schedule.js:305 Uncaught TypeError: Cannot convert undefined or null to object at Function.keys (<anonymous>) at t.getDayNames (schedule.js:305) at Object.getDayName (view-base.js:15) at Object.eval (eval at compile$1 (template.js:55), <anonymous>:3:45) at template-engine.js:19 at t.getTdContent (vertical-view.js:298) at t.createTd (vertical-view.js:469) at t.renderDatesHeader (vertical-view.js:437) at t.renderHeader (vertical-view.js:355) at t.renderLayout (vertical-view.js:345)
t.getDayNames@schedule.js:305
getDayName@view-base.js:15
(anonymous)@VM169:3
(anonymous)@template-engine.js:19
t.getTdContent@vertical-view.js:298
t.createTd@vertical-view.js:469
t.renderDatesHeader@vertical-view.js:437
t.renderHeader@vertical-view.js:355
t.renderLayout@vertical-view.js:345
e.initializeLayout@renderer.js:93
e.render@renderer.js:18
t.initializeView@schedule.js:281
t.renderElements@schedule.js:140
t.initializeResources@schedule.js:119
t.render@schedule.js:109
t.refresh@component.js:99
t.propertyChangeAction@schedule.js:809
t.onPropertyChanged@schedule.js:805
e.dataBind@base.js:103
t.dataBind@component.js:139
r@util.js:29
postMessage (async)
setImmediate@util.js:34
e.saveChanges@base.js:115
(anonymous)@notify-property-change.js:65
(anonymous)@VM41:3
e.notify@observer.js:89
setCulture@internationalization.js:183
ajax.onSuccess@Index:446
e.successHandler@ajax.js:99
e.stateChange@ajax.js:127
t.httpRequest.onreadystatechange@ajax.js:63
XMLHttpRequest.send (async)
(anonymous)@ajax.js:92
e.send@ajax.js:61
(anonymous)@Index:449

Regards,
 Peter

3 Replies

KK Karthigeyan Krishnamurthi Syncfusion Team March 14, 2019 05:32 AM UTC

Hi Nemeth,   
 
Thank you for contacting Syncfusion support. 
 
We have prepared the locale sample for hu culture using Locale property for your reference. 
 
Regards, 
Karthi 



PN Péter N March 14, 2019 08:34 AM UTC

Thank you very much!

Regards,
 Peter


KK Karthigeyan Krishnamurthi Syncfusion Team March 15, 2019 03:21 AM UTC

Hi Peter,   
 
Thanks for your update. 
 
Regards, 
Karthi 


Loader.
Live Chat Icon For mobile
Up arrow icon