Spread.Sheets Documentation
createDateValidator Method
GC.Spread.Sheets Namespace > DataValidation type : createDateValidator Method
The type of ComparisonOperators compare operator.
The first object.
The second object.
Creates a validator based on the data.
Syntax
var value; // Type: DefaultDataValidator
value = GC.Spread.Sheets.DataValidation.createDateValidator(typeOperator, v1, v2);
function createDateValidator( 
   typeOperator : ComparisonOperators,
   v1 : object,
   v2 : object
) : DefaultDataValidator;

Parameters

typeOperator
The type of ComparisonOperators compare operator.
v1
The first object.
v2
The second object.

Return Value

The validator.
Example
This example creates a data validator.
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");
activeSheet.getCell(1, -1).validator(dv);
See Also

Reference

DataValidation type