Hello, I’m having trouble adjusting the format of a cell.
Money for pt-BR
The user enters the value in different ways and the result is the same but the Handsontable is not detected.
If the user enters 1234,56 the handsontable detects a monetary value and formats it to 1.234,56
However, if the user enters the value 1.234,56 , the handsontable marks the cell with a red background as if it were wrong
Even in this example the bug occurs.
https://jsfiddle.net/Lq8megpy/
In the Price column (Euro)
Entering 1234,56 the same problem occurs.
My Code
Includes
< script src=“https://cdn.jsdelivr.net/npm/handsontable@9.0/dist/handsontable.full.min.js”>/script>
< link type=“text/css” rel=“stylesheet” href=“https://cdn.jsdelivr.net/npm/handsontable@9.0/dist/handsontable.full.min.css” />
< script src=“https://handsontable.com/docs/8.4.0/components/numbro/dist/languages.min.js”>
data = [{nome:'Thiago', valor: '1254'},{nome:'Eduardo', valor: '5561'}];
const container = document.getElementById('example');
const hot = new Handsontable(container, {
data: data,
colHeaders: ['nome', 'valor'],
colWidths: 100,
licenseKey: 'non-commercial-and-evaluation', // for non-commercial use only
columns: [
{
data: 'nome'
},
{
data: 'valor',
type: 'numeric',
numericFormat: {
pattern: 'R$ 0,0.00',
culture: 'pt-BR'
},
},
]
});
Has anyone experienced this bug?
Thanks