MarkZoneOptions class (Schedule)

MarkZoneOptions()

new MarkZoneOptions()

The MarkZoneOptions type holds all options a MarkZone object can display or own. A mark-zone is a visual element that highlights a specific time period on the schedule, and it is represented by an object of MarkZone type. The mark-zone can highlight a single date/time or a time interval, and it can be used to indicate holidays, special events, or any other significant time periods on the schedule, in the time-scale as in the schedule view as well. The start, end or time field should be used to specify the mark-zone's date/time.

Every option of the MarkZoneOptions type has associated a property of the MarkZone object. For instance, the option:

shape {string}, defines the shape of the mark-zone
is associated with the property:
Shape {any}, defines the shape for the mark-zone (applied on the schedule view only)
which means that the following statements are equivalent:
oMarkZone.Options = {shape: "red"}
oMarkZone.SetOptions({shape: "red"})
oMarkZone.Shape = "red"
oMarkZone.SetShaoe("red")
where oMarkZone is an object of MarkZone type

Members

(static) caption :any

The caption field defines the ex-HTML caption of the mark-zone. The caption is displayed within the mark-zone, and it can be used to provide additional information about the highlighted time period. If the caption field is not set or it is set to null, no caption is displayed within the mark-zone. The formatMarkZoneCaption field specifies the format and alignment to display the mark-zone's caption. By default, the caption field is not defined, and no caption is displayed within the mark-zone.

The caption field is mapped to the Caption property of the MarkZone object, which means that the following statements are equivalent:

oMarkZone.Options = {caption: "Holiday"}
oMarkZone.SetOptions({caption: "Holiday"})
oMarkZone.Caption = "Holiday"
oMarkZone.SetCaption("Holiday")
Type:
  • any
Example
null {null}, resets the caption of the mark-zone
"caption" {string}, defines the plain-caption for the mark-zone
caption

(static) end :any

The end field indicates the date/time when the mark-zone ends. The start field indicates the date/time when the mark-zone begins. The time field indicates the date/time of the mark-zone (simulates a timer, so time, end and time are identhical). Setting the time field is equivalent to setting both start and end fields to the same value.

The end field can be any of the following:

  • {null} or {undefined}, indicates the current date and time (equivalent of Date.Now())
  • {number}, indicates the Jan 1st of the year, such as "Jan 1st 2001" for 2001
  • {string}, defines the date in string-format as "#MM/DD/YYYY[ HH:mm:ss]#", such as "#10/10/2011 14:48#" or string-format as "YYYY-MM-DDTHH:mm:ss.sssZ" (ISO 8601), such as "2011-10-10" (date-only format), "2011-10-10T14:48:00" (local date-time format), "2011-10-10T14:48:00Z" (UTC date-time format), or "2011-10-10T14:48:00.000+09:00" (date-time format with milliseconds and time zone offset)
  • {Date}, indicates a javascript Date to be copied, such as "Wed, 25 Mar 2015 15:00:00 GMT" for new Date("2015-03-25T15:00:00Z")

The end field is mapped to the End property of the MarkZone object, which means that the following statements are equivalent:

oMarkZone.Options = {end: "#10/10/2011 14:48#"}
oMarkZone.SetOptions({end: "#10/10/2011 14:48#"})
oMarkZone.End = "#10/10/2011 14:48#"
oMarkZone.SetEnd("#10/10/2011 14:48#")
Type:
  • any
Example
null {null}, is equivalent of Date.Now()
2001 {number}, is equivalent of Mon, 01 Jan 2001 00:00:00 GMT
"#12/31/1971 13:00#" {string}, is equivalent of Fri, 31 Dec 1971 13:00:00 GMT
new Date("2015-03-25T15:00:00Z"), is equivalent of Wed, 25 Mar 2015 15:00:00 GMT
end

(static) eventShape :any

The eventShape field defines the shape to apply on events that intersect the current mark-zone. You can use the eventShape field to highlight events that intersect the mark-zone, by applying a specific shape on them. The shape field defines the shape for the mark-zone (applied on the schedule view only). The timeScaleShape field defines the shape for the mark-zone (applied on the time-scale only).

The eventShape field can be any of the following:

  • the shape's name within the exontrol.Shapes.Schedule or exontrol.Shapes namespace
  • a CSS color
  • a JSON string-representation of an object of exontrol.Def.Shape type, for the group itself
  • an object of {normal,hover,click,disabled} type. The normal, hover, click and disabled are objects of exontrol.Def.Shape type

The eventShape field is mapped to the EventShape property of the MarkZone object, which means that the following statements are equivalent:

oMarkZone.Options = {eventShape: "red"}
oMarkZone.SetOptions({eventShape: "red"})
oMarkZone.EventShape = "red"
oMarkZone.SetEventShape("red")
Type:
  • any
Example
null {null}, no custom shape is applied (default object's shape may be applied)
"" {string}, no custom shape is applied (no default object's shape is be applied)
"red" {string}, fills the object's background in red (CSS color)
'{"fillColor": "red"}' or '{"normal":{"fillColor": "red"}}' {string}, fills the object's background in red (JSON-representation of an object of exontrol.Def.Shape type)
"xxx" {string}, indicates that exontrol.Shapes.Schedule.xxx or exontrol.Shapes.xxx is applied on the object's background. If the xxx field is missing, no custom shape is applied (no default object's shape is be applied)
"Button" or exontrol.Shapes.Button {object}, applies the "Button" shape on the object as defined into exontrol.Shapes namespace (@since 5.2)
eventShape

(static) groupID :any

The groupID field specifies the identifier of the group where the MarkZone object belongs. The group is used to associate the mark-zone with a specific group of the schedule, so that the mark-zone is displayed only on the schedule view of the associated group. If the groupID field is not set or it is set to null, the mark-zone is not associated with any group, and it is displayed on all schedule views.

The control displays groups if:

  • showGroupingEvents field is true
  • The Groups collection has visible elements. By default, the Groups collection contains no Group objects

The groupID field is mapped to the GroupID property of the MarkZone object, which means that the following statements are equivalent:

oMarkZone.Options = {groupID: "G1"}
oMarkZone.SetOptions({groupID: "G1"})
oMarkZone.GroupID = "G1"
oMarkZone.SetGroupID("G1")
Type:
  • any
Example
null {null}, no group is associated with the mark-zone
0 {number}, the mark-zone is associated with the group index 0 (0-based)
"G1" {string}, the mark-zone is associated with the group of identifier "G1"
groupID

(static) key :string

The key field specifies the key associated with the mark-zone. The key is used to identify the mark-zone, so that you can request it by its key using the Schedule.MarkZone(key) method. If the key field is not set or it is set to null, no key is associated with the mark-zone, and you cannot request it by a key, but you can request it by its index within the MarkZones collection using the Schedule.MarkZone(index) method.

The key field is mapped to the Key property of the MarkZone object, which means that the following statements are equivalent:

oMarkZone.Options = {key: "logo"}
oMarkZone.SetOptions({key: "logo"})
oMarkZone.Key = "logo"
oMarkZone.SetKey("logo")
Type:
  • string
Example
"logo" {string}, defines the mark-zone with the giving key (logo). You can use the oSchedule.MarkZone("logo") method to request the mark-zone giving its key.
key

(static) repetitive :string

The repetitive field indicates the format-expression to define the repetitive mark-zone. With a valid repetitive formula, the start and end fields specify only the start and end time of the repetitive mark-zone, while the repetitive expression determines all occurrence dates.

The value keyword, indicates the date being queried in the format-expression. The format-expression is a boolean expression that defines the occurrence dates of the repetitive mark-zone, by evaluating the date specified by the value keyword. The value keyword can be used with any date function or operator supported by the format-expression, such as weekday(value) to get the weekday of the queried date, month(value) to get the month of the queried date, etc. For instance, "weekday(value) = 1", the mark-zone occurs every Monday.

The repetitive field is mapped to the Repetitive property of the MarkZone object, which means that the following statements are equivalent:

oMarkZone.Options = {repetitive: "weekday(value) = 1"}
oMarkZone.SetOptions({repetitive: "weekday(value) = 1"})
oMarkZone.Repetitive = "weekday(value) = 1"
oMarkZone.SetRepetitive("weekday(value) = 1")
Type:
  • string
Example
"" {string} or null {null}, the mark-zone is not repetitive (no effect)
"0" {string}, no occurrence
"1" {string}, the mark-zone occurs every day
"weekday(value) = 1" {string}, the mark-zone occurs every Monday
"weekday(value) in (1,2) and month(value) = 6", the mark-zone occurs every Monday and Tuesday, on June only
"value in (#6/8/2012#,#6/11/2012#,#6/20/2012#)", the mark-zone occurs on 6/8/2012, 6/11/2012 and 6/20/2012
"value >= #6/1/2012# and ( (value - #6/1/2012#)/86400000 mod 5 = 0)", the mark-zone starts on 6/1/2012, and shows up every 5 days
repetitive

(static) shape :any

The shape field defines the shape for the mark-zone (applied on the schedule view only). The timeScaleShape field defines the shape for the mark-zone (applied on the time-scale only). The "mark-zone" part of shapes field defines the shape for all mark-zones (which by default is shown as a light-grayed diagonal hatch). If shape field is specified it it merged with the default shape for mark-zones ("mark-zone" part of shapes field), and the resulting shape is applied on the schedule view of the mark-zone. The eventShape field defines the shape to apply on events that intersect the current mark-zone.

The shape field can be any of the following:

  • the shape's name within the exontrol.Shapes.Schedule or exontrol.Shapes namespace
  • a CSS color
  • a JSON string-representation of an object of exontrol.Def.Shape type, for the mark-zone
  • an object of {normal,hover,click,disabled} type. The normal, hover, click and disabled are objects of exontrol.Def.Shape type

The shape field is mapped to the Shape property of the MarkZone object, which means that the following statements are equivalent:

oMarkZone.Options = {shape: "red"}
oMarkZone.SetOptions({shape: "red"})
oMarkZone.Shape = "red"
oMarkZone.SetShape("red")
Type:
  • any
Example
null {null}, no custom shape is applied (default object's shape may be applied)
"" {string}, no custom shape is applied (no default object's shape is be applied)
"red" {string}, fills the object's background in red (CSS color)
'{"fillColor": "red"}' or '{"normal":{"fillColor": "red"}}' {string}, fills the object's background in red (JSON-representation of an object of exontrol.Def.Shape type)
"xxx" {string}, indicates that exontrol.Shapes.Schedule.xxx or exontrol.Shapes.xxx is applied on the object's background. If the xxx field is missing, no custom shape is applied (no default object's shape is be applied)
"Button" or exontrol.Shapes.Button {object}, applies the "Button" shape on the object as defined into exontrol.Shapes namespace (@since 5.2)
shape

(static) start :any

The start field indicates the date/time when the mark-zone begins. The end field indicates the date/time when the mark-zone ends. The time field indicates the date/time of the mark-zone (simulates a timer, so time, end and time are identhical). Setting the time field is equivalent to setting both start and end fields to the same value.

The start field can be any of the following:

  • {null} or {undefined}, indicates the current date and time (equivalent of Date.Now())
  • {number}, indicates the Jan 1st of the year, such as "Jan 1st 2001" for 2001
  • {string}, defines the date in string-format as "#MM/DD/YYYY[ HH:mm:ss]#", such as "#10/10/2011 14:48#" or string-format as "YYYY-MM-DDTHH:mm:ss.sssZ" (ISO 8601), such as "2011-10-10" (date-only format), "2011-10-10T14:48:00" (local date-time format), "2011-10-10T14:48:00Z" (UTC date-time format), or "2011-10-10T14:48:00.000+09:00" (date-time format with milliseconds and time zone offset)
  • {Date}, indicates a javascript Date to be copied, such as "Wed, 25 Mar 2015 15:00:00 GMT" for new Date("2015-03-25T15:00:00Z")

The start field is mapped to the Start property of the MarkZone object, which means that the following statements are equivalent:

oMarkZone.Options = {start: "#10/10/2011 14:48#"}
oMarkZone.SetOptions({start: "#10/10/2011 14:48#"})
oMarkZone.Start = "#10/10/2011 14:48#"
oMarkZone.SetStart("#10/10/2011 14:48#")
Type:
  • any
Example
null {null}, is equivalent of Date.Now()
2001 {number}, is equivalent of Mon, 01 Jan 2001 00:00:00 GMT
"#12/31/1971 13:00#" {string}, is equivalent of Fri, 31 Dec 1971 13:00:00 GMT
new Date("2015-03-25T15:00:00Z"), is equivalent of Wed, 25 Mar 2015 15:00:00 GMT
start

(static) time :any

The time field indicates the date/time of the mark-zone (simulates a timer, so time, end and time are identhical). Setting the time field is equivalent to setting both start and end fields to the same value. The start field indicates the date/time when the mark-zone begins. The end field indicates the date/time when the mark-zone ends.

The time field can be any of the following:

  • {null} or {undefined}, indicates the current date and time (equivalent of Date.Now())
  • {number}, indicates the Jan 1st of the year, such as "Jan 1st 2001" for 2001
  • {string}, defines the date in string-format as "#MM/DD/YYYY[ HH:mm:ss]#", such as "#10/10/2011 14:48#" or string-format as "YYYY-MM-DDTHH:mm:ss.sssZ" (ISO 8601), such as "2011-10-10" (date-only format), "2011-10-10T14:48:00" (local date-time format), "2011-10-10T14:48:00Z" (UTC date-time format), or "2011-10-10T14:48:00.000+09:00" (date-time format with milliseconds and time zone offset)
  • {Date}, indicates a javascript Date to be copied, such as "Wed, 25 Mar 2015 15:00:00 GMT" for new Date("2015-03-25T15:00:00Z")

The time field is mapped to the Time property of the MarkZone object, which means that the following statements are equivalent:

oMarkZone.Options = {time: "#10/10/2011 14:48#"}
oMarkZone.SetOptions({time: "#10/10/2011 14:48#"})
oMarkZone.Time = "#10/10/2011 14:48#"
oMarkZone.SetTime("#10/10/2011 14:48#")
Type:
  • any
Example
null {null}, is equivalent of Date.Now()
2001 {number}, is equivalent of Mon, 01 Jan 2001 00:00:00 GMT
"#12/31/1971 13:00#" {string}, is equivalent of Fri, 31 Dec 1971 13:00:00 GMT
new Date("2015-03-25T15:00:00Z"), is equivalent of Wed, 25 Mar 2015 15:00:00 GMT
time

(static) timeScaleShape :any

The timeScaleShape field defines the shape for the mark-zone (applied on the time-scale only). The shape field defines the shape for the mark-zone (applied on the schedule view only). The eventShape field defines the shape to apply on events that intersect the current mark-zone.

The timeScaleShape field can be any of the following:

  • the shape's name within the exontrol.Shapes.Schedule or exontrol.Shapes namespace
  • a CSS color
  • a JSON string-representation of an object of exontrol.Def.Shape type, for the mark-zone
  • an object of {normal,hover,click,disabled} type. The normal, hover, click and disabled are objects of exontrol.Def.Shape type

The timeScaleShape field is mapped to the TimeScaleShape property of the MarkZone object, which means that the following statements are equivalent:

oMarkZone.Options = {timeScaleShape: "red"}
oMarkZone.SetOptions({timeScaleShape: "red"})
oMarkZone.TimeScaleShape = "red"
oMarkZone.SetTimeScaleShape("red")
Type:
  • any
Example
null {null}, no custom shape is applied (default object's shape may be applied)
"" {string}, no custom shape is applied (no default object's shape is be applied)
"red" {string}, fills the object's background in red (CSS color)
'{"fillColor": "red"}' or '{"normal":{"fillColor": "red"}}' {string}, fills the object's background in red (JSON-representation of an object of exontrol.Def.Shape type)
"xxx" {string}, indicates that exontrol.Shapes.Schedule.xxx or exontrol.Shapes.xxx is applied on the object's background. If the xxx field is missing, no custom shape is applied (no default object's shape is be applied)
"Button" or exontrol.Shapes.Button {object}, applies the "Button" shape on the object as defined into exontrol.Shapes namespace (@since 5.2)
timeScaleShape

(static) visible :boolean

The visible field indicates whether the mark-zone is visible or hidden. You can use the visible field to show or hide the mark-zone, without removing it from the control. If the visible field is not set or it is set to null, the mark-zone is shown by default.

The visible field is mapped to the Visible property of the MarkZone object, which means that the following statements are equivalent:

oMarkZone.Options = {visible: false}
oMarkZone.SetOptions({visible: false})
oMarkZone.Visible = false
oMarkZone.SetVisible(false)
Type:
  • boolean
Example
false {boolean}, hides the mark-zone
true {boolean}, shows the mark-zone
visible