I noticed that the allowEmpty
property is not working properly. I know that you need a validator for it to work, but it fails. Check out this fiddle
https://jsfiddle.net/ezmkw8ng/1/
document.addEventListener("DOMContentLoaded", function() {
var bogus_data = [
['asd', "2015-10-2010"], // an invalid date here
['', '']
],
example1 = document.getElementById('table'),
settings1 = {
data: bogus_data,
colHeaders: ['name', 'Date'],
columns: [{
allowEmpty: true,
validator: (value, callback) => {
const valid = value === 'ok';
callback(valid);
},
type: 'text'
},
{
type: 'date',
allowEmpty: true,
dateFormat: 'YYYY-MM-DD'
}
]
};
var hot = new Handsontable(example1, settings1);
hot.validateCells(function(valid) {})
});
The funny thing is, if I set allowEmpty to false for the date, it works there, but it shouldn’t with no validator, right?