which I able to successfully saved in database and then retrieved in handsontable. But while retrieving I couldn’t able to control its display look. I want the date to be displayed as “DD/MM/YYYY” but it is being displayed as
at the first glance, it looks like the table hasn’t been reloaded. Is double clicking any of the date cells changes the format to the one you would like to have?
var hot = new Handsontable(hotElement, hotSettings);
Handsontable.hooks.add('afterInit', afterInitFunction);
Handsontable.hooks.add('afterLoadData', afterInitFunction);
function afterInitFunction(){
hot.render();
}
Don’t you get any errors logs for that code @even-mind?
Please try
var hot = new Handsontable(hotElement, hotSettings);
Handsontable.hooks.add('afterLoadData', afterInitFunction);
setTimeout(function(){
hot.render();
}, 50)
Thank you for sharing. You’re right - it doesn’t work for double dots. I’ve checked if the MomentJS is supporting this format using this demo https://codepen.io/anon/pen/VXrEmG - and it does, so the issue should be on our side.
Sure’ here’s the example Handsontable example - JSFiddle - Code Playground
ps. I have also deleted afterInitFunction (290-291) reference as there is no function like this in this demo, which caused the log
Uncaught ReferenceError: afterInitFunction is not defined
and stopped my validateCells method from executing.
Oh ok I see, it’s working now but I have a huge table (1000k elements) so the validation occurs like 5s after the table initialisation… Is there a way to validate cells On Init ?