SpreadJS Documentation
DateCondition Constructor
The date comparison type.
The expected date condition.
The formula.
Represents a date condition with the specified comparison type, expected date condition, and formula.
Syntax
var instance = new GcSpread.Sheets.DateCondition(compareType, expected, formula);
function DateCondition( 
   compareType : DateCompareType,
   expected : object,
   formula : string
) : DateCondition;

Parameters

compareType
The date comparison type.
expected
The expected date condition.
formula
The formula.
Example
This example validates cell data.
var nCondition = new GcSpread.Sheets.DateCondition(GcSpread.Sheets.DateCompareType.Before, new Date(2012, 11, 31));
var validator = new GcSpread.Sheets.DefaultDataValidator(nCondition)
activeSheet.getCell(0, 0, GcSpread.Sheets.SheetArea.viewport).dataValidator(validator);
spread.highlightInvalidData(true);
activeSheet.setValue(0, 0, new Date(2012, 12, 12));
See Also

Reference

DateCondition type

 

 


Copyright © GrapeCity, inc. All rights reserved.

Send comments on this topic.