SpreadJS Documentation
DateOccurringRule class
Represents a DateOccurringRule with the specified type and style.
Syntax
var instance = new GcSpread.Sheets.DateOccurringRule(type, style);
function DateOccurringRule;
Example
This example creates a date occurring rule.
var style = new GcSpread.Sheets.Style();
style.backColor = "red";
var rule = new GcSpread.Sheets.DateOccurringRule(GcSpread.Sheets.DateOccurringType.NextWeek,style);
rule.ranges=[new GcSpread.Sheets.Range(0,0,10,1)];
sheet.getConditionalFormats().addRule(rule);
var d = new Date();
sheet.setValue(0, 0, d);
sheet.setValue(1, 0, new Date(d.setDate(d.getDate()+1)));
sheet.setValue(2, 0, new Date(d.setDate(d.getDate()+5)));
sheet.setValue(3, 0,new Date(d.setDate(d.getDate()+6)));
sheet.setValue(4, 0,new Date(d.setDate(d.getDate()+7)));
sheet.setValue(5, 0, new Date(d.setDate(d.getDate()+8)));
Inheritance Hierarchy

Object
   GcSpread.Sheets.ConditionRuleBase
      GcSpread.Sheets.DateOccurringRule

Constructors
 NameDescription
public ConstructorDateOccurringRule ConstructorRepresents a DateOccurringRule with the specified type and style.  
Top
Fields
 NameDescription
public Fieldranges (Inherited from GcSpread.Sheets.ConditionRuleBase)
public Fieldstyle (Inherited from GcSpread.Sheets.ConditionRuleBase)
public FieldtypeThe rule type.  
Top
Methods
 NameDescription
public Methodcontains (Inherited from GcSpread.Sheets.ConditionRuleBase)
public Methodevaluate (Inherited from GcSpread.Sheets.ConditionRuleBase)
public MethodgetExpected (Inherited from GcSpread.Sheets.ConditionRuleBase)
public Methodintersects (Inherited from GcSpread.Sheets.ConditionRuleBase)
public Methodpriority (Inherited from GcSpread.Sheets.ConditionRuleBase)
public MethodresetResets the rule.  
public MethodstopIfTrue (Inherited from GcSpread.Sheets.ConditionRuleBase)
Top
See Also

Reference

GcSpread.Sheets Namespace
Using the Date Occurring Rule

 

 


Copyright © GrapeCity, inc. All rights reserved.

Send comments on this topic.