new Event(oEvents)
Every option of the EventOptions type has associated a property of the Event object. For instance, the option:
cursor {string}, defines the mouse-cursor for the eventis associated with the property:
Cursor {string}, defines the mouse-cursor for the eventwhich means that the following statements are equivalent:
oEvent.Options = {cursor: "pointer"}where oEvent is an object of Event type
oEvent.SetOptions({cursor: "pointer"})
oEvent.Cursor = "pointer"
oEvent.SetCursor("pointer")
Parameters:
| Name | Type | Description |
|---|---|---|
oEvents |
Event | Indicates an object of Events type that's the owner collection of this event. |
Members
AllDay :boolean
Type:
- boolean
Example
false {boolean}, the event is not an all-day event, and it is displayed in the time-scale of the day
true {boolean}, the event is an all-day event, and it is displayed in All-Day header
AllDay
Caption :string
- the ShortLabel and LongLabel properties define the short and long labels of the event, displayed when the control is zoomed out or zoomed in, respectively
- the ExtraLabel property defines an additional label for the event
Type:
- string
Example
null {null}, resets the caption of the event
"caption" {string}, defines the plain-caption for the event
Caption
Cursor :string
Type:
- string
Example
"pointer" {string}, The cursor is a pointer that indicates a link (typically an image of a pointing hand)
Cursor
Duration :number|string
The getter of the Duration property returns the duration of the event in days, or hours, minutes, seconds if including the decimal point, for instance 0.5 indicates a 12-hour length. So, a 1-day event returns 1, while a 12-hour event returns 0.5.
The setter of the Duration property can be any of the following types, as explained:
- {number}, indicates a numeric expression that defines the event's duration in days. The duration field can be one of the following:
- 0 {number}, specifies that the start and end margins of the event are identichal, such as for a line event
- positive {number}, specifies that the end margin of the event is changed as end = start + duration, while the start margin is not changed
- negative {number}, specifies that the start margin of the event is changed as start = end + duration, while the end margin is not changed
- {string}, specifes the hours and minutes in "[+/-]HH[:MM[:NN]]" format to define the event's duration, where HH, MM and NN are hours, minutes and seconds respectively. The duration field can be one of the following:
- "4:30" {string}, defines the event's duration to 4 hours and 30 minutes (changes the end-margin of the event)
- "-4:30" {string}, defines the event's duration to 4 hours and 30 minutes (changes the start-margin of the event)
Type:
- number | string
Example
1 {number}, defines a 1-day event (changes the end-margin of the event)
12/24 or 0.5 {number}, defines a 12 hours event (changes the end-margin of the event)
-12/24 or -0.5 {number}, defines a 12 hours event (changes the start-margin of the event)
"4:30" {string}, defines the event's duration to 4 hours and 30 minutes (changes the end-margin of the event)
"-4:30" {string}, defines the event's duration to 4 hours and 30 minutes (changes the start-margin of the event)
Duration
Enabled :boolean
Type:
- boolean
Example
false {boolean}, disables the event
true {boolean}, enables the event
Enabled
End :any
The value of the End property can be any of the following types, as explained:
- {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")
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
ExtraLabel :any
The known identifiers within the <%=formula%> tag are:
- %1 (exEventStartDateTime) {Date}, indicates the starting date/time of the event. This property gets the Start property of the event. The Start property defines the lower margin of the event, and it includes the date and the time values. The exEventStartDate specifies the DATE value only, while the exEventStartTime includes the TIME value only. For instance, the LabelProperty = "<%=weekday(%1)%>" displays the day of the week where the event starts
- %2 (exEventEndDateTime) {Date}, indicates the ending date/time of the event. This property gets or sets the End property of the event. The End property defines the upper margin of the event, and it includes the date and the time values. The exEventEndDate specifies the DATE value only, while the exEventEndTime includes the TIME value only. For instance, the LabelProperty = "<%=weekday(%2)%>" gets the day of the week where the event ends.
- %3 (exEventAllDay) {boolean}, indicates if the current event is an all day event. This property is equivalent with the event's AllDay property which indicates if the current event is an all-day event. For instance, the LabelProperty = "<%=%3 ? `All-Day-Event: `: ``%><%=%256%>", displays automatically an "All-Day-Event: " prefix for all-day events. If the event is not an all-day event, the <%=%256%>, or exEventDisplayShortMargins, short margins of the events are displayed.
- %4 (exEventGroupID) {any}, specifies the identifier/index of the event's group. The GroupID property of the event indicates the identifier of the group that event belongs to. The exEventGroupLabel property indicates the Caption property of the Group's event. The exEventGroupTitle property indicates the Title property of the Group's event. For instance, the LabelProperty = "<%=%4%>
<%=%256%>" displays on the first line, the group's identifier, and the short margins of the event on the second line. The caption of the label is automatically updated once an event is moved from a group to another. - %5 (exEventCaption) {string}, indicates the caption of the event. The Caption property of the event specifies the custom caption that can be displayed on the label, without having to change the event's label. For instance, the LabelProperty = "<%=%256%>
<%=%5%>" displays on the first line, the event's short margins, while on the second line displays the event's caption. Once you update or edit the event's Caption, the event's body automatically shows the new caption. - %6 (exEventUserData) {any}, indicates the extra data associated with the event. The UserData property of the event indicates an extra data associated with the event. For instance, the LabelProperty = "<%=%256%>
<%=%6%>" displays on the first line, the event's short margins, while on the second line displays the event's user data. Once you update or edit the event's UserData, the event's body automatically shows the new label. - %7 (exEventDuration) {number}, specifies the duration of the event. The returned values is of float type, and it indicates the duration of the event in days. For instance, the 1.5 indicates, 1 day and 12 hours. For instance, the LabelProperty = "<%=%256%>
<%=((1:=int(0:= (date(%2)-date(%1)))) != 0 ? (=:1 + ' day(s)') : '') + (=:1 ? ' ' : '' ) + ((1:=int(0:=((=:0 - =:1 + 1/24/60/60/2)*24))) != 0 ? =:1 + ' hour(s)' : '' ) + (=:1 ? ' ' : '' ) + ((1:=round((=:0 - =:1)*60)) != 0 ? =:1 + ' min(s)' : '')%>" displays on the first line, the event's short margins, while on the second line displays the event's durations in days, hours and minutes. Once you update or edit the event's margins, the event's body automatically shows the new length. You can use the MoveBy method to delay the current event with a specified value time. You can use the SetKnownProperty(exEventDuration) to change the event's duration. - %8 (exEventRepetitiveExpression) {string}, specifies the repetitive expression of the event. The Event.Repetitive property indicates the expression that determines whether the event is repetitive. For instance, the LabelProperty = "<%=%256%>
<%=len(%8)? `repetitive event`:``%>" displays repetitive event for repetitive events. - %12 (exEventID) {string}, specifies the event's unique key/identifier/index.
- %256 (exEventDisplayShortMargins) {string}, displays the margins of the event in a short format (read-only). The ShortDateFormat property defines the short date format. The ShortTimeFormat property defines the short time format.
- %257 (exEventDisplayLongMargins) {string}, displays the margins of the event in a long format (read-only). The LongDateFormat property defines the long date format. The LongTimeFormat property defines the long time format.
- %258 (exEventStartDate) {Date}, gets the starting date ( not including the time ) of the event (read-only). You can use this property to get the starting date of the event.
- %259 (exEventStartTime) {number}, gets the starting time ( not including the date ) of the event, as a number between 0 and 1 (read-only). You can use this property to get the starting time of the event.
- %260 (exEventEndDate) {Date}, gets the ending date ( not including the time ) of the event (read-only). You can use this property to get the ending date of the event.
- %261 (exEventEndTime) {number}, gets the ending time ( not including the date ) of the event, as a number between 0 and 1 (read-only). You can use this property to get the ending time of the event.
- %262 (exEventGroupLabel) {string}, gets the label of the owner group (read-only). The exEventGroupLabel property indicates the Caption property of the Group's event. The GroupID property of the event indicates the identifier of the group that event belongs to. The exEventGroupTitle property indicates the Title property of the Group's event. For instance, the LabelProperty = "<%=%262%>
<%=%256%>" displays on the first line, the group's caption, and the short margins of the event on the second line. The caption of the label is automatically updated once an event is moved from a group to another. - %263 (exEventGroupTitle) {string}, gets the title of the owner group (read-only). The exEventGroupTitle property indicates the Title property of the Group's event. The exEventGroupLabel property indicates the Caption property of the Group's event. The GroupID property of the event indicates the identifier of the group that event belongs to. For instance, the LabelProperty = "<%=%263%>
<%=%256%>" displays on the first line, the group's caption, and the short margins of the event on the second line. The caption of the label is automatically updated once an event is moved from a group to another. - %264 (exEventRepetitive) {boolean}, Indicates if the current event is a repetitive event. (read-only). You can use this flag to specify whether Repetitive property of the Event object is not empty, and valid.
Type:
- any
Example
null {null} or undefined {undefined}, no extra-label is displayed (unless DefaultEventExtraLabel property defines an extra-label for the event, then it is displayed)
"" {string}, no extra-label is displayed
"<img>image</img> and text" {string}, displays the image and the text. The image can be added using the exontrol.HTMLPicture.Add method
"<%=%256%>", displays the event's start and end margins in a short format
ExtraLabel
GroupID :any
The getter of the GroupID property returns the identifier of the group as defined in the Group object, while the setter of the GroupID property can be any of the following types, as explained:
- {null}, dissociates the event from any group
- {number}, moves the event to the group with the index 0 (0-based)
- {string}, moves the event to the group with the identifier "G1"
Type:
- any
Example
null {null}, dissociates the event from any group
0 {number}, moves the event to the group with the index 0 (0-based)
"G1" {string}, moves the event to the group with the identifier "G1"
GroupID
(readonly) Index :number
Type:
- number
Example
The following statements are equivalents:
oEvent.GetIndex(), retrieves the event's index
oEvent.Index, retrieves the event's index
where oEvent is an object of Event type
Index
Key :string
The Key property is automatically set when events are defined using the events field as an object, where the member names define the keys. For example:
oSchedule.Events = {break: {start: "#10/10/2011 14:48#", end: "#10/10/2011 15:48#"}}
In this case, the event's key is "break", meaning the event can be accessed using the oSchedule.Event("break") method. When defining events as objects, the Key property is optional, as it is automatically assigned from the member name that defines the event. However, when defining events as an array of EventOptions objects, the Key property must be explicitly specified for each event.
Type:
- string
Example
"logo" {string}, defines the event with the giving key (logo). You can use the oSchedule.Event("logo") method to request the event giving its key.
Key
LongLabel :any
The known identifiers within the <%=formula%> tag are:
- %1 (exEventStartDateTime) {Date}, indicates the starting date/time of the event. This property gets the Start property of the event. The Start property defines the lower margin of the event, and it includes the date and the time values. The exEventStartDate specifies the DATE value only, while the exEventStartTime includes the TIME value only. For instance, the LabelProperty = "<%=weekday(%1)%>" displays the day of the week where the event starts
- %2 (exEventEndDateTime) {Date}, indicates the ending date/time of the event. This property gets or sets the End property of the event. The End property defines the upper margin of the event, and it includes the date and the time values. The exEventEndDate specifies the DATE value only, while the exEventEndTime includes the TIME value only. For instance, the LabelProperty = "<%=weekday(%2)%>" gets the day of the week where the event ends.
- %3 (exEventAllDay) {boolean}, indicates if the current event is an all day event. This property is equivalent with the event's AllDay property which indicates if the current event is an all-day event. For instance, the LabelProperty = "<%=%3 ? `All-Day-Event: `: ``%><%=%256%>", displays automatically an "All-Day-Event: " prefix for all-day events. If the event is not an all-day event, the <%=%256%>, or exEventDisplayShortMargins, short margins of the events are displayed.
- %4 (exEventGroupID) {any}, specifies the identifier/index of the event's group. The GroupID property of the event indicates the identifier of the group that event belongs to. The exEventGroupLabel property indicates the Caption property of the Group's event. The exEventGroupTitle property indicates the Title property of the Group's event. For instance, the LabelProperty = "<%=%4%>
<%=%256%>" displays on the first line, the group's identifier, and the short margins of the event on the second line. The caption of the label is automatically updated once an event is moved from a group to another. - %5 (exEventCaption) {string}, indicates the caption of the event. The Caption property of the event specifies the custom caption that can be displayed on the label, without having to change the event's label. For instance, the LabelProperty = "<%=%256%>
<%=%5%>" displays on the first line, the event's short margins, while on the second line displays the event's caption. Once you update or edit the event's Caption, the event's body automatically shows the new caption. - %6 (exEventUserData) {any}, indicates the extra data associated with the event. The UserData property of the event indicates an extra data associated with the event. For instance, the LabelProperty = "<%=%256%>
<%=%6%>" displays on the first line, the event's short margins, while on the second line displays the event's user data. Once you update or edit the event's UserData, the event's body automatically shows the new label. - %7 (exEventDuration) {number}, specifies the duration of the event. The returned values is of float type, and it indicates the duration of the event in days. For instance, the 1.5 indicates, 1 day and 12 hours. For instance, the LabelProperty = "<%=%256%>
<%=((1:=int(0:= (date(%2)-date(%1)))) != 0 ? (=:1 + ' day(s)') : '') + (=:1 ? ' ' : '' ) + ((1:=int(0:=((=:0 - =:1 + 1/24/60/60/2)*24))) != 0 ? =:1 + ' hour(s)' : '' ) + (=:1 ? ' ' : '' ) + ((1:=round((=:0 - =:1)*60)) != 0 ? =:1 + ' min(s)' : '')%>" displays on the first line, the event's short margins, while on the second line displays the event's durations in days, hours and minutes. Once you update or edit the event's margins, the event's body automatically shows the new length. You can use the MoveBy method to delay the current event with a specified value time. You can use the SetKnownProperty(exEventDuration) to change the event's duration. - %8 (exEventRepetitiveExpression) {string}, specifies the repetitive expression of the event. The Event.Repetitive property indicates the expression that determines whether the event is repetitive. For instance, the LabelProperty = "<%=%256%>
<%=len(%8)? `repetitive event`:``%>" displays repetitive event for repetitive events. - %12 (exEventID) {string}, specifies the event's unique key/identifier/index.
- %256 (exEventDisplayShortMargins) {string}, displays the margins of the event in a short format (read-only). The ShortDateFormat property defines the short date format. The ShortTimeFormat property defines the short time format.
- %257 (exEventDisplayLongMargins) {string}, displays the margins of the event in a long format (read-only). The LongDateFormat property defines the long date format. The LongTimeFormat property defines the long time format.
- %258 (exEventStartDate) {Date}, gets the starting date ( not including the time ) of the event (read-only). You can use this property to get the starting date of the event.
- %259 (exEventStartTime) {number}, gets the starting time ( not including the date ) of the event, as a number between 0 and 1 (read-only). You can use this property to get the starting time of the event.
- %260 (exEventEndDate) {Date}, gets the ending date ( not including the time ) of the event (read-only). You can use this property to get the ending date of the event.
- %261 (exEventEndTime) {number}, gets the ending time ( not including the date ) of the event, as a number between 0 and 1 (read-only). You can use this property to get the ending time of the event.
- %262 (exEventGroupLabel) {string}, gets the label of the owner group (read-only). The exEventGroupLabel property indicates the Caption property of the Group's event. The GroupID property of the event indicates the identifier of the group that event belongs to. The exEventGroupTitle property indicates the Title property of the Group's event. For instance, the LabelProperty = "<%=%262%>
<%=%256%>" displays on the first line, the group's caption, and the short margins of the event on the second line. The caption of the label is automatically updated once an event is moved from a group to another. - %263 (exEventGroupTitle) {string}, gets the title of the owner group (read-only). The exEventGroupTitle property indicates the Title property of the Group's event. The exEventGroupLabel property indicates the Caption property of the Group's event. The GroupID property of the event indicates the identifier of the group that event belongs to. For instance, the LabelProperty = "<%=%263%>
<%=%256%>" displays on the first line, the group's caption, and the short margins of the event on the second line. The caption of the label is automatically updated once an event is moved from a group to another. - %264 (exEventRepetitive) {boolean}, Indicates if the current event is a repetitive event. (read-only). You can use this flag to specify whether Repetitive property of the Event object is not empty, and valid.
Type:
- any
Example
null {null} or undefined {undefined}, the control's DefaultEventLongLabel property defines the event's long-label (visible while it fits the event's body, else the event's short-label is displayed)
"" {string}, no long-label for the event is displayed
"<img>image</img> and text" {string}, displays the image and the text. The image can be added using the exontrol.HTMLPicture.Add method
"<%=%256%>", displays the event's start and end margins in a long format
LongLabel
Movable :boolean
Type:
- boolean
Example
false {boolean}, the event can not be moved at runtime
true {boolean}, the event is movable
Movable
Options :EventOptions
Every option of the EventOptions type has associated a property of the event. For instance, the option:
cursor {string}, defines the mouse-cursor for the eventis associated with the property:
Cursor {string}, defines the mouse-cursor for the eventwhich means that the following statements are equivalent:
oEvent.Options = {cursor: "pointer"}
oEvent.SetOptions({cursor: "pointer"})
oEvent.Cursor = "pointer"
oEvent.SetCursor("pointer")
It is important to note that changing a field of the Options object does not automatically update the event. For example, oEvent.Options.cursor = "pointer" does not apply the change. Instead, you must assign the Options property again, such as oEvent.Options = {cursor: "pointer"}, so the control updates and applies the new value.
Type:
Example
The following statements are equivalents:
oEvent.Options = {shape: "red"}
oEvent.SetOptions({shape: "red"})
where oEvent is an object of Event type
Options
Repetitive :string
The Repetitive property supports:
- Value format, when using the value keyword, which indicates the date being queried in the format-expression. The format-expression is a boolean expression that defines the occurrence dates of the repetitive event, 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 event occurs every Monday.
- ICalendar format, as described in RFC 5545. For instance, "FREQ=WEEKLY;BYDAY=MO", the event occurs every Monday (requires "exontrol.icalendar.js"). The ICalendar format supports the following rules:
- FREQ, {string} The FREQ rule part identifies the type of recurrence rule. This rule part MUST be specified
in the recurrence rule.
The valid values are "SECONDLY", "MINUTELY", "HOURLY", "DAILY", "WEEKLY", "MONTHLY" and "YEARLY", as explained:
- SECONDLY, to specify repeating events based on an interval of a second or more
- MINUTELY, to specify repeating events based on an interval of a minute or more
- HOURLY, to specify repeating events based on an interval of an hour or more
- DAILY, to specify repeating events based on an interval of a day or more
- WEEKLY, to specify repeating events based on an interval of a week or more
- MONTHLY, to specify repeating events based on an interval of a month or more
- YEARLY, to specify repeating events based on an interval of a year or more
For example, "FREQ=DAILY;" indicates a daily recurrence rule.
- DTSTART, {Date} The DTSTART rule specifies the date the recurrence starts from, in YYYYMMDD[THHNNSS[Z]]
format. If missing the current date and time is used.
The format supports:
- DATE format, as YYYYMMDD (for example, 20220101 indicates January 1st, 2022)
- DATE-TIME format, as YYYYMMDDTHHNNSS (for example, 20220101T090000 indicates January 1st, 2022, at 09:00 AM local time)
- DATE-TIME in UTC format, as YYYYMMDDTHHNNSSZ (for example, 20220101T090000Z indicates January 1st, 2022, at 09:00 AM UTC)
- YYYY indicates the year
- MM indicates the month (01 = January, 02 = February, ..., 12 = December)
- DD indicates the day of the month (01 through 31)
- T character is used to separate the date and time portions of the value
- HH indicates the hour (00 through 23)
- NN indicates the minute (00 through 59)
- SS indicates the second (00 through 60)
- Z character indicates that the time is in UTC format.
For example, "FREQ=DAILY;DTSTART=20220101T090000Z;" indicates a daily recurrence rule starting from January 1st, 2022, at 09:00 AM UTC.
- INTERVAL {number} The INTERVAL rule part contains a positive integer representing at which intervals the
recurrence rule repeats.
The default value is "1", meaning:
- every 1 second for a SECONDLY rule
- every 1 minute for a MINUTELY rule
- every 1 hour for an HOURLY rule
- every 1 day for a DAILY rule
- every 1 week for a WEEKLY rule
- every 1 month for a MONTHLY rule
- every 1 year for a YEARLY rule
- COUNT, {number} The COUNT rule part defines the number of occurrences at which to range-bound the
recurrence. The DTSTART property value always counts as the first occurrence. The COUNT rule part is a positive
integer.
For example, "FREQ=DAILY;COUNT=10" indicates a recurrence rule for 10 times
- WKST, {string} The WKST rule part specifies the day on which the workweek starts. The default value is MO.
The WKST rule part is significant when a WEEKLY "RRULE" has an interval greater than 1, and a BYDAY rule part is
specified. This is also significant when in a YEARLY "RRULE" when a BYWEEKNO rule part is specified.
Valid values are:
- MO, for Monday
- TU, for Tuesday
- WE, for Wednesday
- TH, for Thursday
- FR, for Friday
- SA, for Saturday
- SU, for Sunday
For example, "FREQ=WEEKLY;WKST=SU" indicates a weekly recurrence rule where the week starts on Sunday
- UNTIL, {Date} The UNTIL rule part defines a DATE or DATE-TIME value that bounds the recurrence rule in an
inclusive manner. If the value specified by UNTIL is synchronized with the specified recurrence, this DATE or
DATE-TIME becomes the last instance of the recurrence.
The format of UNTIL is YYYYMMDD[THHNNSS[Z]], supporting:
- DATE format, as YYYYMMDD (for example, 20220101 indicates January 1st, 2022)
- DATE-TIME format, as YYYYMMDDTHHNNSS (for example, 20220101T090000 indicates January 1st, 2022, at 09:00 AM local time)
- DATE-TIME in UTC format, as YYYYMMDDTHHNNSSZ (for example, 20220101T090000Z indicates January 1st, 2022, at 09:00 AM UTC)
- YYYY indicates the year
- MM indicates the month (01 = January, 02 = February, ..., 12 = December)
- DD indicates the day of the month (01 through 31)
- T character is used to separate the date and time portions of the value
- HH indicates the hour (00 through 23)
- NN indicates the minute (00 through 59)
- SS indicates the second (00 through 60)
- Z character indicates that the time is in UTC format.
For example, "FREQ=DAILY;UNTIL=20220110T090000Z" indicates a daily recurrence rule until January 10th, 2022, at 09:00 AM UTC.
- BYWEEKNO, {string} The BYWEEKNO rule part specifies a COMMA-separated list of ordinals specifying weeks of
the year. Valid values are 1 to 53 or -53 to -1. The week numbering follows the ISO 8601 standard, where the first
week of the year is the week that contains the first Thursday of the year. For example, week number 1 is the week
with the first Thursday in January. Week number 52 is the week with the last Thursday in December. Week number 53 is
only used in years where January 1st is a Thursday or a leap year where January 1st is a Wednesday. The BYWEEKNO
rule part MUST NOT be specified when the FREQ rule part is set to DAILY, WEEKLY, or MONTHLY.
For example, "FREQ=YEARLY;BYWEEKNO=20,30" indicates a yearly recurrence rule on the 20th and 30th weeks of the year
- BYDAY, {string} The BYDAY rule part specifies a COMMA-separated list of days of the week. Each BYDAY value
can also be preceded by a positive (+n) or negative (-n) integer. If present, this indicates the nth occurrence of
the specific day within the MONTHLY or YEARLY "RRULE". For example, within a MONTHLY rule, +1MO indicates the first
Monday of the month, whereas -1MO indicates the last Monday of the month. Within a YEARLY rule, +3TU indicates the
third Tuesday of the year. Valid values for n are 1 to 5 or -5 to -1. The BYDAY rule part MUST NOT be specified when
the FREQ rule part is set to DAILY.
Valid values are:
- MO, for Monday
- TU, for Tuesday
- WE, for Wednesday
- TH, for Thursday
- FR, for Friday
- SA, for Saturday
- SU, for Sunday
For example, "FREQ=WEEKLY;BYDAY=MO,WE,FR" indicates a weekly recurrence rule on Monday, Wednesday and Friday
- BYMONTHDAY, {string} The BYMONTHDAY rule part specifies a COMMA-separated list of days of the month. Valid
values are 1 to 31 or -31 to -1. For example, -10 represents the tenth to the last day of the month. The BYMONTHDAY
rule part MUST NOT be specified when the FREQ rule part is set to WEEKLY.
For example, "FREQ=MONTHLY;BYMONTHDAY=15,-1" indicates a monthly recurrence rule on the 15th and the last day of the month
- BYYEARDAY, {string} The BYYEARDAY rule part specifies a COMMA-separated list of days of the year. Valid
values are 1 to 366 or -366 to -1. For example, -1 represents the last day of the year (December 31st) and -306
represents the 306th to the last day of the year (March 1st). The BYYEARDAY rule part MUST NOT be specified when the
FREQ rule part is set to DAILY, WEEKLY, or MONTHLY.
For example, "FREQ=YEARLY;BYYEARDAY=100,200" indicates a yearly recurrence rule on the 100th and 200th days of the year
- BYSETPOS, {string} The BYSETPOS rule part specifies a COMMA-separated list of values that corresponds to
the nth occurrence within the set of recurrence instances specified by the rule. BYSETPOS operates on a set of
recurrence instances in one interval of the recurrence rule. For example, in a WEEKLY rule, the interval would be
one week A set of recurrence instances starts at the beginning of the interval defined by the FREQ rule part. Valid
values are 1 to 366 or -366 to -1. It MUST only be used in conjunction with another BYxxx rule part. For example
"the last work day of the month" could be represented as: FREQ=MONTHLY;BYDAY=MO,TU,WE,TH,FR;BYSETPOS=-1 Each
BYSETPOS value can include a positive (+n) or negative (-n) integer. If present, this indicates the nth occurrence
of the specific occurrence within the set of occurrences specified by the rule.
For example, "FREQ=MONTHLY;BYDAY=MO,TU,WE,TH,FR;BYSETPOS=-1" indicates a monthly recurrence rule on the last work day of the month
- BYMONTH, {string} The BYMONTH rule part specifies a COMMA-separated list of months of the year. Valid
values are 1 to 12.
For example, "FREQ=YEARLY;BYMONTH=1,6,12" indicates a yearly recurrence rule on January, June and December
- BYHOUR, {string} The BYHOUR rule part specifies a COMMA-separated list of hours of the day. Valid values
are 0 to 23.
For example, "FREQ=DAILY;BYHOUR=9,14,18" indicates a daily recurrence rule at 09:00 AM, 02:00 PM and 06:00 PM
- BYMINUTE, {string} The BYMINUTE rule part specifies a COMMA-separated list of minutes within an hour. Valid
values are 0 to 59.
For example, "FREQ=HOURLY;BYMINUTE=0,30" indicates an hourly recurrence rule at minute 0 and minute 30 of each hour
- BYSECOND, {string} The BYSECOND rule part specifies a COMMA-separated list of seconds within a minute.
Valid values are 0 to 60.
For example, "FREQ=MINUTELY;BYSECOND=0,15,30,45" indicates a minutely recurrence rule at second 0, second 15, second 30 and second 45 of each minute
- FREQ, {string} The FREQ rule part identifies the type of recurrence rule. This rule part MUST be specified
in the recurrence rule.
Type:
- string
Example
Value format samples:
"" {string} or null {null}, the event is not repetitive (no effect)
"0" {string}, no occurrence
"1" {string}, the event occurs every day
"weekday(value) = 1" {string}, the event occurs every Monday
"weekday(value) in (1,2) and month(value) = 6", the event occurs every Monday and Tuesday, on June only
"value in (#6/8/2012#,#6/11/2012#,#6/20/2012#)", the event 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 event starts on 6/1/2012, and shows up every 5 days
ICalendar format samples (requires "exontrol.icalendar.js"):
"FREQ=DAILY", the event occurs daily
"FREQ=MONTHLY", the event occurs monthly
"FREQ=WEEKLY;BYDAY=MO,FR", the event occurs weekly every Monday and Friday
Repetitive
Resizable :exontrol.Schedule.EventResizableEnum
The Resizable property can be set to the following values:
- exNoResizable (0), the event can not be resized
- exResizableStart(1), only the starting point of the event can be resized
- exResizableEnd (2), only the ending point of the event can be resized
- exResizableBoth (3), indicates a sizeable event, so the user can resize at runtime the start or end point of the event (default)
Type:
- exontrol.Schedule.EventResizableEnum
Example
false {boolean} exNoResizable (0), the event can not be resized
true {boolean} or exResizableStart(1), only the starting point of the event can be resized
3 {number} or exResizableBoth(3), indicates a sizeable event, so the user can resize at runtime the start or end point of the event (default)
Resizable
Selectable :boolean
Type:
- boolean
Example
false {boolean}, the event is unselectable
true {boolean}, the event is selectable
Selectable
Selected :boolean
Type:
- boolean
Example
false {boolean}, the event is unselected
true {boolean}, the event is selected
Selected
Shape :any
The value of the Shape property can be any of the following:
- null, no custom-shape is applied on the object (default-shape may be applied instead)
- 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 event
- an object of {normal,hover,click,disabled} type. The normal, hover, click and disabled are objects of exontrol.Def.Shape type
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
ShortLabel :any
The known identifiers within the <%=formula%> tag are:
- %1 (exEventStartDateTime) {Date}, indicates the starting date/time of the event. This property gets the Start property of the event. The Start property defines the lower margin of the event, and it includes the date and the time values. The exEventStartDate specifies the DATE value only, while the exEventStartTime includes the TIME value only. For instance, the LabelProperty = "<%=weekday(%1)%>" displays the day of the week where the event starts
- %2 (exEventEndDateTime) {Date}, indicates the ending date/time of the event. This property gets or sets the End property of the event. The End property defines the upper margin of the event, and it includes the date and the time values. The exEventEndDate specifies the DATE value only, while the exEventEndTime includes the TIME value only. For instance, the LabelProperty = "<%=weekday(%2)%>" gets the day of the week where the event ends.
- %3 (exEventAllDay) {boolean}, indicates if the current event is an all day event. This property is equivalent with the event's AllDay property which indicates if the current event is an all-day event. For instance, the LabelProperty = "<%=%3 ? `All-Day-Event: `: ``%><%=%256%>", displays automatically an "All-Day-Event: " prefix for all-day events. If the event is not an all-day event, the <%=%256%>, or exEventDisplayShortMargins, short margins of the events are displayed.
- %4 (exEventGroupID) {any}, specifies the identifier/index of the event's group. The GroupID property of the event indicates the identifier of the group that event belongs to. The exEventGroupLabel property indicates the Caption property of the Group's event. The exEventGroupTitle property indicates the Title property of the Group's event. For instance, the LabelProperty = "<%=%4%>
<%=%256%>" displays on the first line, the group's identifier, and the short margins of the event on the second line. The caption of the label is automatically updated once an event is moved from a group to another. - %5 (exEventCaption) {string}, indicates the caption of the event. The Caption property of the event specifies the custom caption that can be displayed on the label, without having to change the event's label. For instance, the LabelProperty = "<%=%256%>
<%=%5%>" displays on the first line, the event's short margins, while on the second line displays the event's caption. Once you update or edit the event's Caption, the event's body automatically shows the new caption. - %6 (exEventUserData) {any}, indicates the extra data associated with the event. The UserData property of the event indicates an extra data associated with the event. For instance, the LabelProperty = "<%=%256%>
<%=%6%>" displays on the first line, the event's short margins, while on the second line displays the event's user data. Once you update or edit the event's UserData, the event's body automatically shows the new label. - %7 (exEventDuration) {number}, specifies the duration of the event. The returned values is of float type, and it indicates the duration of the event in days. For instance, the 1.5 indicates, 1 day and 12 hours. For instance, the LabelProperty = "<%=%256%>
<%=((1:=int(0:= (date(%2)-date(%1)))) != 0 ? (=:1 + ' day(s)') : '') + (=:1 ? ' ' : '' ) + ((1:=int(0:=((=:0 - =:1 + 1/24/60/60/2)*24))) != 0 ? =:1 + ' hour(s)' : '' ) + (=:1 ? ' ' : '' ) + ((1:=round((=:0 - =:1)*60)) != 0 ? =:1 + ' min(s)' : '')%>" displays on the first line, the event's short margins, while on the second line displays the event's durations in days, hours and minutes. Once you update or edit the event's margins, the event's body automatically shows the new length. You can use the MoveBy method to delay the current event with a specified value time. You can use the SetKnownProperty(exEventDuration) to change the event's duration. - %8 (exEventRepetitiveExpression) {string}, specifies the repetitive expression of the event. The Event.Repetitive property indicates the expression that determines whether the event is repetitive. For instance, the LabelProperty = "<%=%256%>
<%=len(%8)? `repetitive event`:``%>" displays repetitive event for repetitive events. - %12 (exEventID) {string}, specifies the event's unique key/identifier/index.
- %256 (exEventDisplayShortMargins) {string}, displays the margins of the event in a short format (read-only). The ShortDateFormat property defines the short date format. The ShortTimeFormat property defines the short time format.
- %257 (exEventDisplayLongMargins) {string}, displays the margins of the event in a long format (read-only). The LongDateFormat property defines the long date format. The LongTimeFormat property defines the long time format.
- %258 (exEventStartDate) {Date}, gets the starting date ( not including the time ) of the event (read-only). You can use this property to get the starting date of the event.
- %259 (exEventStartTime) {number}, gets the starting time ( not including the date ) of the event, as a number between 0 and 1 (read-only). You can use this property to get the starting time of the event.
- %260 (exEventEndDate) {Date}, gets the ending date ( not including the time ) of the event (read-only). You can use this property to get the ending date of the event.
- %261 (exEventEndTime) {number}, gets the ending time ( not including the date ) of the event, as a number between 0 and 1 (read-only). You can use this property to get the ending time of the event.
- %262 (exEventGroupLabel) {string}, gets the label of the owner group (read-only). The exEventGroupLabel property indicates the Caption property of the Group's event. The GroupID property of the event indicates the identifier of the group that event belongs to. The exEventGroupTitle property indicates the Title property of the Group's event. For instance, the LabelProperty = "<%=%262%>
<%=%256%>" displays on the first line, the group's caption, and the short margins of the event on the second line. The caption of the label is automatically updated once an event is moved from a group to another. - %263 (exEventGroupTitle) {string}, gets the title of the owner group (read-only). The exEventGroupTitle property indicates the Title property of the Group's event. The exEventGroupLabel property indicates the Caption property of the Group's event. The GroupID property of the event indicates the identifier of the group that event belongs to. For instance, the LabelProperty = "<%=%263%>
<%=%256%>" displays on the first line, the group's caption, and the short margins of the event on the second line. The caption of the label is automatically updated once an event is moved from a group to another. - %264 (exEventRepetitive) {boolean}, Indicates if the current event is a repetitive event. (read-only). You can use this flag to specify whether Repetitive property of the Event object is not empty, and valid.
Type:
- any
Example
null {null} or undefined {undefined}, the control's DefaultEventShortLabel property defines the event's short-label
"" {string}, no short-label for the event is displayed
"<img>image</img> and text" {string}, displays the image and the text. The image can be added using the exontrol.HTMLPicture.Add method
"<%=%256%>", displays the event's start and end margins in a short format
ShortLabel
Start :any
The value of the Start property can be any of the following types, as explained:
- {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")
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
ToolTip :string
The known identifiers within the <%=formula%> tag are:
- %1 (exEventStartDateTime) {Date}, indicates the starting date/time of the event. This property gets the Start property of the event. The Start property defines the lower margin of the event, and it includes the date and the time values. The exEventStartDate specifies the DATE value only, while the exEventStartTime includes the TIME value only. For instance, the LabelProperty = "<%=weekday(%1)%>" displays the day of the week where the event starts
- %2 (exEventEndDateTime) {Date}, indicates the ending date/time of the event. This property gets or sets the End property of the event. The End property defines the upper margin of the event, and it includes the date and the time values. The exEventEndDate specifies the DATE value only, while the exEventEndTime includes the TIME value only. For instance, the LabelProperty = "<%=weekday(%2)%>" gets the day of the week where the event ends.
- %3 (exEventAllDay) {boolean}, indicates if the current event is an all day event. This property is equivalent with the event's AllDay property which indicates if the current event is an all-day event. For instance, the LabelProperty = "<%=%3 ? `All-Day-Event: `: ``%><%=%256%>", displays automatically an "All-Day-Event: " prefix for all-day events. If the event is not an all-day event, the <%=%256%>, or exEventDisplayShortMargins, short margins of the events are displayed.
- %4 (exEventGroupID) {any}, specifies the identifier/index of the event's group. The GroupID property of the event indicates the identifier of the group that event belongs to. The exEventGroupLabel property indicates the Caption property of the Group's event. The exEventGroupTitle property indicates the Title property of the Group's event. For instance, the LabelProperty = "<%=%4%>
<%=%256%>" displays on the first line, the group's identifier, and the short margins of the event on the second line. The caption of the label is automatically updated once an event is moved from a group to another. - %5 (exEventCaption) {string}, indicates the caption of the event. The Caption property of the event specifies the custom caption that can be displayed on the label, without having to change the event's label. For instance, the LabelProperty = "<%=%256%>
<%=%5%>" displays on the first line, the event's short margins, while on the second line displays the event's caption. Once you update or edit the event's Caption, the event's body automatically shows the new caption. - %6 (exEventUserData) {any}, indicates the extra data associated with the event. The UserData property of the event indicates an extra data associated with the event. For instance, the LabelProperty = "<%=%256%>
<%=%6%>" displays on the first line, the event's short margins, while on the second line displays the event's user data. Once you update or edit the event's UserData, the event's body automatically shows the new label. - %7 (exEventDuration) {number}, specifies the duration of the event. The returned values is of float type, and it indicates the duration of the event in days. For instance, the 1.5 indicates, 1 day and 12 hours. For instance, the LabelProperty = "<%=%256%>
<%=((1:=int(0:= (date(%2)-date(%1)))) != 0 ? (=:1 + ' day(s)') : '') + (=:1 ? ' ' : '' ) + ((1:=int(0:=((=:0 - =:1 + 1/24/60/60/2)*24))) != 0 ? =:1 + ' hour(s)' : '' ) + (=:1 ? ' ' : '' ) + ((1:=round((=:0 - =:1)*60)) != 0 ? =:1 + ' min(s)' : '')%>" displays on the first line, the event's short margins, while on the second line displays the event's durations in days, hours and minutes. Once you update or edit the event's margins, the event's body automatically shows the new length. You can use the MoveBy method to delay the current event with a specified value time. You can use the SetKnownProperty(exEventDuration) to change the event's duration. - %8 (exEventRepetitiveExpression) {string}, specifies the repetitive expression of the event. The Event.Repetitive property indicates the expression that determines whether the event is repetitive. For instance, the LabelProperty = "<%=%256%>
<%=len(%8)? `repetitive event`:``%>" displays repetitive event for repetitive events. - %12 (exEventID) {string}, specifies the event's unique key/identifier/index.
- %256 (exEventDisplayShortMargins) {string}, displays the margins of the event in a short format (read-only). The ShortDateFormat property defines the short date format. The ShortTimeFormat property defines the short time format.
- %257 (exEventDisplayLongMargins) {string}, displays the margins of the event in a long format (read-only). The LongDateFormat property defines the long date format. The LongTimeFormat property defines the long time format.
- %258 (exEventStartDate) {Date}, gets the starting date ( not including the time ) of the event (read-only). You can use this property to get the starting date of the event.
- %259 (exEventStartTime) {number}, gets the starting time ( not including the date ) of the event, as a number between 0 and 1 (read-only). You can use this property to get the starting time of the event.
- %260 (exEventEndDate) {Date}, gets the ending date ( not including the time ) of the event (read-only). You can use this property to get the ending date of the event.
- %261 (exEventEndTime) {number}, gets the ending time ( not including the date ) of the event, as a number between 0 and 1 (read-only). You can use this property to get the ending time of the event.
- %262 (exEventGroupLabel) {string}, gets the label of the owner group (read-only). The exEventGroupLabel property indicates the Caption property of the Group's event. The GroupID property of the event indicates the identifier of the group that event belongs to. The exEventGroupTitle property indicates the Title property of the Group's event. For instance, the LabelProperty = "<%=%262%>
<%=%256%>" displays on the first line, the group's caption, and the short margins of the event on the second line. The caption of the label is automatically updated once an event is moved from a group to another. - %263 (exEventGroupTitle) {string}, gets the title of the owner group (read-only). The exEventGroupTitle property indicates the Title property of the Group's event. The exEventGroupLabel property indicates the Caption property of the Group's event. The GroupID property of the event indicates the identifier of the group that event belongs to. For instance, the LabelProperty = "<%=%263%>
<%=%256%>" displays on the first line, the group's caption, and the short margins of the event on the second line. The caption of the label is automatically updated once an event is moved from a group to another. - %264 (exEventRepetitive) {boolean}, Indicates if the current event is a repetitive event. (read-only). You can use this flag to specify whether Repetitive property of the Event object is not empty, and valid.
Type:
- string
Example
null {null} or undefined {undefined}, the control's DefaultEventToolTip property defines the event's tooltip
"" {string}, no tooltip for the event is displayed
"<img>image</img> and text" {string}, the image and text is being shown once the mouse pointer hovers the event. The image can be added using the exontrol.HTMLPicture.Add method
"<%=%256%>", displays the event's start and end margins in a short format
ToolTip
UserData :any
Type:
- any
Example
1234 {number}, associates the number 1234 with the event
"Meeting at 3 PM" {string}, associates the string "Meeting at 3 PM" with the event
{location: "Office", attendees: ["John", "Jane"]} {object}, associates an object with the event
UserData
Visible :boolean
Type:
- boolean
Example
false {boolean}, hides the event
true {boolean}, shows the event
Visible
Methods
EndUpdateEvent(startUpdateEvent)
Parameters:
| Name | Type | Description |
|---|---|---|
startUpdateEvent |
any | Holds the result of a StartUpdateEvent() method. |
- Since:
- 2.1
Example
The following statements are equivalent:
var oStartEventUpdate = oEvent.StartUpdateEvent();
...
oEvent.EndUpdateEvent(oStartEventUpdate);
or
oEvent.UpdateEvent(function()
{
...
});
where oEvent is an object of Event type.
EndUpdateEvent
EnsureVisible()
- Since:
- 2.1
Example
oEvent.EnsureVisible(), scrolls the view so the event (calendar appointment) fits the control's visible-area
EnsureVisible
GetKnownProperty(index) → {any}
Parameters:
| Name | Type | Description |
|---|---|---|
index |
number | Specifies the identifier of the event's property to request as listed:
|
Returns:
- Type
- any
Example
oEvent.GetKnownProperty(256) {string}, gets the margins of the event in a short format
oEvent.GetKnownProperty(257) {string}, gets the margins of the event in a long format
GetKnownProperty
MoveBy(value)
Parameters:
| Name | Type | Description |
|---|---|---|
value |
number | string | Indicates one of the following:
|
Example
0.5 {number}, moves the current event 12 hours later
-0.5 {number}, moves the current event 12 hours earlier
"00:15" {string}, moves the current event 15 minutes later,
"-00:15" {string}, moves the current event 15 minutes earlier
MoveBy
Remove()
Example
The following statements are equivalents:
oSchedule.Events.Remove(id)
oSchedule.Event(id).Remove()
where oSchedule is an object of Schedule type, and id is the index or identifier/key of the event to remove
Remove
SetKnownProperty(index, value)
Parameters:
| Name | Type | Description |
|---|---|---|
index |
number | Specifies the identifier of the event's property to request as listed:
|
value |
any | Indicates the value of the event's property. |
StartUpdateEvent() → {object}
- Since:
- 2.1
Returns:
- Type
- object
Example
The following statements are equivalent:
var oStartEventUpdate = oEvent.StartUpdateEvent();
...
oEvent.EndUpdateEvent(oStartEventUpdate);
or
oEvent.UpdateEvent(function()
{
...
});
where oEvent is an object of Event type.
StartUpdateEvent
UpdateEvent(callback, thisArg)
Parameters:
| Name | Type | Description |
|---|---|---|
callback |
callback | Specifies a function of callback() type. |
thisArg |
any | Indicates the value of "this" keyword during the callback, or the object itself if missing. |
Example
The following statements are equivalent:
oEvent.UpdateEvent(function()
{
...
});
or
var oStartEventUpdate = oEvent.StartUpdateEvent();
...
oEvent.EndUpdateEvent(oStartEventUpdate);
where oEvent is an object of Event type.
UpdateEvent