Posted 9 November 2020, 6:55 pm EST
Hi Jekin,
We are sorry, but this feature is currently not supported by SJS but you could add Date Validator to the sheet and for the Boolean, you may use check box cell type. Please refer to the following code snippet in the attached sample that demonstrated the same.
spread.options.highlightInvalidData = true;
var dv = GC.Spread.Sheets.DataValidation.createDateValidator(
GC.Spread.Sheets.ConditionalFormatting.ComparisonOperators.between,
new Date(2012, 11, 31),
new Date(2013, 11, 31)
);
dv.showInputMessage(true);
dv.inputMessage("Enter a date between 12/31/2012 and 12/31/2013.");
dv.inputTitle("Tip");
sheet.getCell(-1, 1).validator(dv);
//CheckBox
var c = new GC.Spread.Sheets.CellTypes.CheckBox();
sheet.getCell(-1, 2).cellType(c).width(120);
c.isThreeState(true);
var state = c.isThreeState();
c.isThreeState(false);
c.textTrue("Check state");
c.textFalse("UnCheck state");
Sample: https://codesandbox.io/s/serene-driscoll-7cl8c?file=/src/app/app.component.ts
API References:
createDateValidator:https://www.grapecity.com/spreadjs/docs/v13/online/SpreadJS~GC.Spread.Sheets.DataValidation~createDateValidator.html
checkBoxDemo: https://www.grapecity.com/spreadjs/demos/features/cells/cell-types/checkbox#demo_source_name
Regards
Avinash