allowInvalid Not working with type Date column

Tags: #<Tag:0x00007f8b2a0b4de0>

I have a use-case where we don’t want end-user to select the old dates either they can select today or any date after today.
In the configuration we are using the allowInvalid: false but looks like this is not working and also there is some issue with minDate: new Date().

I think if the date is invalid then it should show an error message on the cell or it will clear the cell.

Please check the jsfiddle -
http://jsfiddle.net/xmpqdavy/

Hi @anil

The datepicker is not controlling the validator of the cell. The cell validator only checks the syntax of the value and marks it invalid if the format is incorrect. You can see it here http://jsfiddle.net/a6ofhn8r/5/
If you would like to mark cells with a certain date as invalid you would need to create a custom validator. Here https://handsontable.com/docs/cell-validator/#full-featured-example is a tutorial on how to create a custom validator and the default syntax is

const validator = (value, callback) => {
    if (condition) {
      callback(true);
    } else {
      callback(false);
    }
}

Thanks for sharing the details can you also check why minDate is not working for current/today date.

I think the validator not working after using the updateSettings-
You can check it here -
http://jsfiddle.net/kwhv47rn/

Hi @anil

in line 12 there’s hot5 instead of hot6.

Thanks