Hi,
I have noticed the error below when I open the view to add a new register. The Grid is being translated correctly, but in the view of adding a new record I have the error below.
Error when open add register dialog:
ej2.min.js:10 Uncaught TypeError: Cannot convert undefined or null to object
at Function.keys (<anonymous>)
at t.getCultureValues (ej2.min.js:10)
at t.createContentHeader (ej2.min.js:10)
at t.createContent (ej2.min.js:10)
at t.createContent (ej2.min.js:10)
at t.render (ej2.min.js:10)
at t.render (ej2.min.js:10)
at t.disabledDates (ej2.min.js:10)
at t.updateInput (ej2.min.js:10)
at t.initialize (ej2.min.js:10)
componet inside Add_Partial_View register and does not work (not open dialog date) when add the script below
<ejs-datetimepicker
cssClass="e-outline "
floatLabelType="Auto"
placeholder="Data Início"
id="DataInicio" name="DataInicio"
format="dd/MM/yyyy HH:mm:ss"
value="@Model.DataInicio.ToString("yyyy-MM-ddTHH:mm:ss")">
</ejs-datetimepicker>
<ejs-scripts></ejs-scripts>
script inside Grid view
function loadCultureFiles() {
var ajax = new ej.base.Ajax(location.origin + '/../../scripts/src/pt-BR.json', 'GET', true);
ajax.send().then((e) => {
var culture = JSON.parse(e);
ej.base.L10n.load(
culture
);
ej.base.setCulture('pt-BR');
ej.base.setCurrencyCode('EUR');
});
}
document.addEventListener('DOMContentLoaded', function () {
loadCultureFiles();
});