Handsontable example
HTML
<script src="https://cdn.jsdelivr.net/npm/handsontable@11.0/dist/handsontable.full.min.js"></script>
<link type="text/css" rel="stylesheet" href="https://cdn.jsdelivr.net/npm/handsontable@11.0/dist/handsontable.full.min.css" />
<div id="example1" class="hot "></div>
JavaScript
const container = document.querySelector('#example1');
const hot = new Handsontable(container, {
licenseKey: 'non-commercial-and-evaluation',
data: [
['Mercedes', '01/14/2021', 6999.95],
['Citroen','12/01/2022', 8330],
['Audi', '11/19/2023', 33900],
['Opel', '02/02/2021', 7000],
['BMW', '07/24/2022', 30500]
],
colHeaders: true,
colWidths: 150,
columns: [
{
type: 'text',
},
{
type: 'date',
dateFormat: 'MM/DD/YYYY',
correctFormat: true,
defaultDate: '01/01/1900'
}
],
beforeValidate: function(value, row, prop){
if(prop == 1){
return '01/14/2021'
}
}
});