SpreadJS Documentation
DateOccurringType Enumeration
Specifies the date occurring type.
Members
MemberDescription
Last7DaysSpecifies the last seven days.
LastMonthSpecifies last month.
LastWeekSpecifies last week.
NextMonthSpecifies next month.
NextWeekSpecifies next week.
ThisMonthSpecifies this month.
ThisWeekSpecifies this week.
TodaySpecifies today.
TomorrowSpecifies tomorrow.
YesterdaySpecifies yesterday.
Example
This example creates a 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)];
activeSheet.getConditionalFormats().addRule(rule);

var d = new Date();
activeSheet.setValue(0, 0, d);
activeSheet.setValue(1, 0, new Date(d.setDate(d.getDate()+1)));
activeSheet.setValue(2, 0, new Date(d.setDate(d.getDate()+5)));
activeSheet.setValue(3, 0,new Date(d.setDate(d.getDate()+6)));
activeSheet.setValue(4, 0,new Date(d.setDate(d.getDate()+7)));
activeSheet.setValue(5, 0, new Date(d.setDate(d.getDate()+8)));
Inheritance Hierarchy

Object
   GcSpread.Sheets.DateOccurringType

See Also

Reference

GcSpread.Sheets Namespace

 

 


Copyright © GrapeCity, inc. All rights reserved.

Send comments on this topic.