new Calendar(client, oOptionsopt)
The ExCalendar/JS component provides calendar capabilities for your application. A calendar is a system of organizing days for social, religious, commercial or administrative purposes. This is done by giving names to periods of time, typically days, weeks, months and years. A date is the designation of a single, specific day within such a system. The ExCalendar/JS is a HTML standalone-component, written in JavaScript, that uses no third-party libraries.
Every option of the Calendar.Options type has associated a property of the control. For instance, the option:
cursors {string}, specifies the mouse cursor to be displayed when pointing over a part of the control
is associated with the property:
Cursors {string}, specifies the mouse cursor to be displayed when pointing over a part of the control
which means that the following statements are equivalent:
oCalendar.Options = {cursors: "pointer(d,p,n)"}
oCalendar.SetOptions({cursors: "pointer(d,p,n)"})
oCalendar.Cursors = "pointer(d,p,n)"
oCalendar.SetCursors("pointer(d,p,n)")
where oCalendar is an object of
Calendar type
Parameters:
Name |
Type |
Attributes |
Description |
client |
any
|
|
The client parameter indicates the control's client area as:
- array of [x,y,width,height] type that specifies the control's client area
- string, that specifies the identifier of the canvas within the document, so the canvas's client area becomes the control's client area
- HTMLCanvasElement, that specifies the identifier of the canvas within the document, so the canvas's client area becomes the control's client area
|
oOptions |
object
|
<optional>
|
An object of Calendar.Options type that defines different options to display the control |
Requires:
- module:exontrol.commmon.min.js
- module:exontrol.icalendar.min.js
Calendar
Requires
- module:exontrol.commmon.min.js
- module:exontrol.icalendar.min.js
Classes
- Options
Members
Listeners :exontrol.Lts
The Listeners field defines the events of the control, as an object of exontrol.Lts type. The exontrol.Lts type supports forEach(callback, thisArg) method that helps you to enumerate the events the control supports. The Events section lists the events the component supports.
Type:
Example
The following sample shows how you can get all events the component currently supports:
oCalendar.Listeners.forEach(function(name)
{
console.log(name);
});
The following sample displays selected dates once the selection is changed:
oCalendar.Listeners.Add("onselchange", function (oEvent)
{
console.log(oEvent);
});
where oCalendar is an object of Calendar type
Listeners
(static, readonly) AutoSizeEnum :number
The Calendar.AutoSizeEnum type determines whether the size of the calendar's date is fixed, or relative to the current font or client area.
Type:
Properties:
Name |
value |
Type |
Description |
exFontSize |
-1 |
number
|
The exFontSize value indicates that the size of the calendar's date is automatically computed based on the current font. |
exFixedSize |
0 |
number
|
The exFixedSize value specifies that the size of the calendar's date is fixed. The dayFixedWidth / dayFixedHeight specifies the size of the calendar's date while autoSize property is Calendar.AutoSizeEnum.exFixedSize. |
exFitClient |
1 |
number
|
The exFitClient value indicates that the size of the calendar's date is computed so entire calendar fits the control's client area |
(static, readonly) CollectEnum :number
The Calendar.CollectEnum type specifies how the Calendar.Collect() method collects dates.
Type:
Properties:
Name |
value |
Type |
Description |
exContinue |
0 |
number
|
The exContinue type specifies that the Collect() method collects dates from current to target date. |
exMonth |
1 |
number
|
The exMonth type specifies that the Collect() method collects months between current and target date. |
exWeek |
2 |
number
|
The exWeek type specifies that the Collect() method collects weeks between current and target date (in the same month). |
exWeekAll |
3 |
number
|
The exWeek type specifies that the Collect() method collects weeks between current and target date. |
exWeekDay |
4 |
number
|
The exWeekDay type specifies that the Collect() method collects week-days between current and target date. |
(static, readonly) FlowEnum :number
The Calendar.FlowEnum type determines whether the months gets arranged from left to right or top to bottom.
Type:
Properties:
Name |
value |
Type |
Description |
exLeftToRight |
0 |
number
|
The exLeftToRight mode indicates that the next month gets arranged to the right of the current month. |
exTopToBottom |
1 |
number
|
The exTopToBottom mode indicates that the next month gets arranged to the bottom of the current month. |
(static, readonly) ModeEnum :number
The Calendar.ModeEnum type defines the orientation the calendar displays the days of the weeks.
Type:
Properties:
Name |
value |
Type |
Description |
exVertical |
0 |
number
|
The exVertical mode specifies that the days of the week are vertically arranged. |
exHorizontal |
1 |
number
|
The exHorizontal mode specifies that the days of the week are horizontally arranged. |
(static, readonly) SingleSelEnum :number
The Calendar.SingleSelEnum type defines flags the singleSel/SetSingleSel/GetSingleSel method uses.
Type:
Properties:
Name |
value |
Type |
Description |
exDisableSel |
0 |
number
|
The exDisableSel value specifies that the control's selection is disabled. |
exEnableSel |
1 |
number
|
The exEnableSel flag specifies that the control's selection is enabled (multiple-selection, unless the exSingleSel is set ). |
exSingleSel |
2 |
number
|
The exSingleSel flag specifies that the user can select a date only. |
exToggleSel |
4 |
number
|
The exToggleSel flag specifies that the date's selection state is toggled once the user clicks a date. |
exDisableCtrlSel |
8 |
number
|
The exDisableCtrlSel flag disables toggling the date's selection state when user clicks a date, while CTRL modifier key is pressed. |
exDisableShiftSel |
16 |
number
|
The exDisableShiftSel flag disables selecting dates using the SHIFT key. |
exDisableDrag |
32 |
number
|
The exDisableDrag flag disables selecting dates by drag. |
(static) parts
The parts() method returns the parts of the control in hierarchical order, as a map of [child-part => parent-part] type. The method divides the string "DA(DMH(DWA,DWH(DW)),DWNH(DWN,DWNN),DM(D,DNM)),MA(MH,MM(M)),YA(YH,YY(Y)),N,P" into a map where each key is a child part and its corresponding value is the parent part.
The parts of the control include:
- "p" (prev), defines the prev button (available for any view)
- "n" (next), defines the next button (available for any view)
The following parts are available while the control displays the day-view:
- "da" (day-all), indicates all objects of the month
- "dmh" (day-month-header) object that indicates the header that displays the month (child of "da")
- "dm" (days-month) specifies all days displayed in the current month (it can include also non-month days as well, child of "da")
- "d" (day), specifies a day of the current month (child of "dm")
- "dnm" (day-non-month), specifies a day that is not part of the current month, but it is still displayed (child of "dm")
- "dwa" (day-weeks-all) indicates the top-left corner object, when the week-header and week-number headers are visible (child of "dmh")
- "dwh" (day-week-header) indicates the header that shows the days of the week (child of "dmh")
- "dw" (day-week) specifies a day into the week-header (child of "dwh")
- "dwnh" (day-week-number-header) indicates the header that displays the week-numbers (child of "da")
- "dwn" (day-week-number) specifies the week-number (child of "dwnh")
- "dwnn" (day-week-number-non-month) specifies the week-number that is not part of the current month (child of "dwnh")
The following parts are available while the control displays the month-view:
- "ma" (month-all) specifies the area to display the entire year
- "mh" (month-header) indicates the header for month-view (it displays the year) (child of "ma")
- "mm" (month-month) indicates the portion of the layout that displays the months of the year (excludes its header) (child of "ma")
- "m" (month) specifies a single month within the month-view (child of "mm")
The following parts are available while the control displays the year-view:
- "ya" (year-all) that specifies the area to display the entire layout
- "yh" (year-header) that indicates the header for year-view (it displays the range of years, child of "ya")
- "yy" (year-years) that indicates the portion of the layout that displays the years (excludes its header, child of "ya"))
- "y" (year) that specifies a single year within the year-view (child of "yy")
.
- Since:
parts
(static) type :string
The type field defines the full-name of the object (the constructor.name does not give the same name for minimized forms).
The Calendar.type member always returns "Calendar"
Type:
- Since:
(static) version :string
The version field defines the version of the control.
The current version is 3.2
Type:
Methods
BeginUpdate()
The BeginUpdate() method suspends the control's render until the EndUpdate() method is called. It maintains performance, while multiple changes occurs within the control. You can use the
Update() method to perform multiple changes at once.
BeginUpdate
EndUpdate()
The EndUpdate() method resumes the control's render, after it is suspended by the BeginUpdate() method.
EndUpdate
Event(id) → {Event}
The Event() method returns the event based on its index or identifier/key. The Event(id) method is equivalent with
Event(id) method of the
Events object
Parameters:
Name |
Type |
Description |
id |
any
|
The event parameter could be any of the following:
- event {number}, indicates a numeric value that defines the index of the event to request
- event {string}, specifies a string expression that defines the identifier/key of the event to request
- event {Event}, specifies the object reference to the event to request for
|
- Since:
Returns:
Returns null or an object of Event type
-
Type
-
Event
Event
GetAlignCal() → {exontrol.AlignEnum}
The GetAlignCal() method specifies the calendar's alignment relative to the canvas.
Returns:
Returns an exontrol.AlignEnum value that defines the calendar alignment relative to its canvas.
The exontrol.AlignEnum type supports the following values:
- exAlignTop (0x00), justifies the object to the top of the rectangle
- exAlignLeft (0x00), aligns object to the left
- exAlignCenter (0x01), centers object horizontally in the rectangle
- exAlignRight (0x02), aligns object to the right
- exAlignVCenter (0x04), centers object vertically
- exAlignBottom (0x08), justifies the object to the bottom of the rectangle
-
Type
-
exontrol.AlignEnum
GetAlignCal
The GetAllowScrollByDrag() method specifies whether the user can scroll the control by drag
Returns:
Returns true, if the user can switch the view (month or year)
-
Type
-
string
GetAllowScrollByDrag
GetAllowSwitchView() → {boolean}
The GetAllowSwitchView() method specifies whether the user can switch the view (month or year)
Returns:
Returns true, if the user can switch the view (month or year)
-
Type
-
boolean
GetAllowSwitchView
The GetAutoSize() method determines whether the size of the calendar's date is fixed, or relative to the current font or client area.
Returns:
Returns an Calendar.AutoSizeEnum that specifies whether the size of the calendar's date is fixed, or relative to the current font or client area.
The Calendar.AutoSizeEnum type defines the following values:
- exFontSize(-1), indicates that the size of the calendar's date is automatically computed based on the current font
- exFixedSize(0), specifies that the size of the calendar's date is fixed. The dayFixedWidth / dayFixedHeight specifies the size of the calendar's date while autoSize property is Calendar.AutoSizeEnum.exFixedSize
- exFitClient(1), indicates that the size of the calendar's date is computed so entire calendar fits the control's client area
-
Type
-
Calendar.AutoSizeEnum
GetAutoSize
GetCursors() → {string}
The GetCursors() method defines the mouse cursor to be displayed when pointing over different parts of the control.
Returns:
A string expression that defines the mouse cursor to be displayed when pointing over different parts of the control.
The format of cursors property is:
"cursor(part),cursor(part),..."
where:
- "cursor", defines the CSS mouse cursor to display while cursor hovers the part
- "part", defines the name of the part the cursor is applied on (as defined bellow)
The "part" can be any of the following:
- "p" (prev), defines the prev button (available for any view)
- "n" (next), defines the next button (available for any view)
- "anchor" (hyperlink), defines the mouse-cursor when the mouse pointer hovers the anchor (the <a> ex-HTML part marks an anchor or hyperlink element) (@since 2.2)
The following parts are available while the control displays the day-view:
- "da" (day-all), indicates all objects of the month.
- "dmh" (day-month-header) object that indicates the header that displays the month
- "dm" (days-month) specifies all days displayed in the current month ( it can include also non-month days as well )
- "d" (day), specifies a day of the current month
- "dnm" (day-non-month), specifies a day that is not part of the current month, but it is still displayed
- "dt" (today), specifies today in the current month
- "ds" (day-select), indicates a selected date
- "de" (week-end), specifies a day of weekend
- "dwa" (day-weeks-all) indicates the top-left corner object, when the week-header and week-number headers are visible
- "dwh" (day-week-header) indicates the header that shows the days of the week
- "dw" (day-week) specifies a day into the week-header
- "dwnh" (day-week-number-header) indicates the header that displays the week-numbers
- "dwn" (day-week-number) specifies the week-number
- "dwnn" (day-week-number-non-month) specifies the week-number that is not part of the current month
The following parts are available while the control displays the month-view:
- "ma" (month-all) specifies the area to display the entire year
- "mh" (month-header) indicates the header for month-view (it displays the year)
- "mm" (month-month) indicates the portion of the layout that displays the months of the year (excludes its header)
- "m" (month) specifies a single month within the month-view
- "mt" (month-today), indicates the current month (the month that contains today)
- "ms" (month-select), indicates a month that contains a selected date
The following parts are available while the control displays the year-view:
- "ya" (year-all) that specifies the area to display the entire layout
- "yh" (year-header) that indicates the header for year-view (it displays the range of years)
- "yy" (year-years) that indicates the portion of the layout that displays the years (excludes its header)
- "y" (year) that specifies a single year within the year-view
- "yt" (year-today), specifies the year of today
- "ys" (year-select), indicates a year that contains a selected date
-
Type
-
string
GetCursors
GetDate() → {Date}
The GetDate() method retrieves the calendar's date
Returns:
A Date object that specifies thecalendar's date
-
Type
-
Date
GetDate
GetDayAlign() → {exontrol.DrawTextFormatEnum}
The GetDayAlign() method defines the format the date's label is being displayed, while the control shows days (day-view).
Returns:
Returns a exontrol.DrawTextFormatEnum value that defines the format the date's label is being displayed.
The exontrol.DrawTextFormatEnum type support the following flags:
- exTextAlignTop (0x00), justifies the text to the top of the rectangle
- exTextAlignLeft (0x00), aligns text to the left
- exTextAlignCenter (0x01), centers text horizontally in the rectangle
- exTextAlignRight (0x02), aligns text to the right
- exTextAlignVCenter (0x04), centers text vertically
- exTextAlignBottom (0x08), justifies the text to the bottom of the rectangle.
- exTextAlignMask (0x0F), specifies the mask for text's alignment.
- exTextWordBreak (0x10), breaks words. Lines are automatically broken between words if a word would extend past the edge of the rectangle specified by the lpRect parameter. A carriage return-line feed sequence also breaks the line. If this is not specified, output is on one line.
- exTextSingleLine (0x20), displays text on a single line only. Carriage returns and line feeds do not break the line.
- exTextExpandTabs (0x40), expands tab characters. The default number of characters per tab is eight.
- exPlainText (0x80), treats the text as plain text.
- exTextNoClip (0x0100), draws without clipping.
- exHTMLTextNoColors (0x0200), ignores the and tags.
- exTextCalcRect (0x0400), determines the width and height of the text.
- exHTMLTextNoTags (0x0800), ignores all HTML tags.
- exTextPathEllipsis (0x4000), for displayed text, replaces characters in the middle of the string with ellipses so that the result fits in the specified rectangle. If the string contains backslash (\) characters, exTextPathEllipsis preserves as much as possible of the text after the last backslash.
- exTextEndEllipsis (0x8000), for displayed text, if the end of a string does not fit in the rectangle, it is truncated and ellipses are added. If a word that is not at the end of the string goes beyond the limits of the rectangle, it is truncated without ellipses.
- exTextWordEllipsis (0x040000), truncates any word that does not fit in the rectangle and adds ellipses.
-
Type
-
exontrol.DrawTextFormatEnum
GetDayAlign
GetDayFixedHeight() → {number}
The GetDayFixedHeight() method defines the height of the calendar's date when autoSize is Calendar.AutoSizeEnum.exFixedSize.
Returns:
Returns an number that specifies the height of the calendar's date when autoSize is Calendar.AutoSizeEnum.exFixedSize.
-
Type
-
number
GetDayFixedHeight
GetDayFixedWidth() → {number}
The GetDayFixedWidth() method defines the width of the calendar's date when autoSize is Calendar.AutoSizeEnum.exFixedSize.
Returns:
Returns an number that specifies the width of the calendar's date when autoSize is Calendar.AutoSizeEnum.exFixedSize.
-
Type
-
number
GetDayFixedWidth
GetDayLabel() → {string}
The GetDayLabel() method indicates a HTML string that can include expression fields (<%...%>) to display the date while the control shows days (day-view).
Returns:
Returns a string that specifies a HTML string that can include expression fields (<%...%>) to display the date while the control shows days (day-view).
The dayLabel property can include any of the following fields:
- "<%d%>", day of the month in one or two numeric digits, as needed (1 to 31)
- "<%dd%>", day of the month in two numeric digits (01 to 31)
- "<%d1%>", first letter of the weekday (S to S)"
- "<%loc_d1%>", indicates day of week as a one-letter abbreviation using the current user settings
- "<%d2%>", first two letters of the weekday (Su to Sa)
- "<%loc_d2%>", indicates day of week as a two-letters abbreviation using the current user settings
- "<%d3%>", first three letters of the weekday (Sun to Sat)
- "<%loc_d3%>", equivalent with "<%loc_ddd%>"
- "<%ddd%>", first three letters of the weekday (Sun to Sat)
- "<%loc_ddd%>", indicates the day of week as a three-letter abbreviation using the current user regional and language settings
- "<%dddd%>", full name of the weekday (Sunday to Saturday)
- "<%loc_dddd%>", indicates day of week as its full name using the current user regional and language settings
- "<%i%>", displays the number instead the date
- "<%w%>", day of the week (1 to 7)
- "<%ww%>", week of the year (1 to 53)
- "<%m%>", month of the year in one or two numeric digits, as needed (1 to 12)
- "<%mr%>", month of the year in Roman numerals, as needed (I to XII)
- "<%mm%>", month of the year in two numeric digits (01 to 12)
- "<%m1%>", first letter of the month (J to D)
- "<%loc_m1%>", indicates month as a one-letter abbreviation using the current user settings
- "<%m2%>", first two letters of the month (Ja to De)
- "<%loc_m2%>", indicates month as a two-letters abbreviation using the current user settings
- "<%m3%>", first three letters of the month (Jan to Dec)
- "<%loc_m3%>", equivalent with "<%loc_mmm%>"
- "<%mmm%>", first three letters of the month (Jan to Dec)
- "<%loc_mmm%>", indicates month as a three-letter abbreviation using the current user regional and language settings
- "<%mmmm%>", full name of the month (January to December)
- "<%loc_mmmm%>", indicates month as its full name using the current user regional and language settings
- "<%q%>", Date displayed as the quarter of the year (1 to 4)
- "<%y%>", number of the day of the year (1 to 366)
- "<%yy%>", last two digits of the year (01 to 99)
- "<%yyyy%>", full year (0100 to 9999)
- "<%hy%>", date displayed as the half of the year (1 to 2)
- "<%loc_g%>", indicates period/era using the current user regional and language settings
- "<%loc_gg%>", indicates period/era using the current user regional and language settings
- "<%loc_sdate%>", indicates the date in the short format using the current user regional and language settings
- "<%loc_ldate%>", indicates the date in the long format using the current user regional and language settings
- "<%loc_dsep%>", indicates the date separator using the current user regional and language settings (/)
- "<%h%>", hour in one or two digits, as needed (0 to 23)
- "<%hh%>", hour in two digits (00 to 23)
- "<%h12%>", hour in 12-hour time format, in one or two digits - [0(12),11]
- "<%hh12%>", hour in 12-hour time format, in two digits - [00(12),11]
- "<%n%>", minute in one or two digits, as needed (0 to 59)
- "<%nn%>", minute in two digits (00 to 59)
- "<%s%>", second in one or two digits, as needed (0 to 59)
- "<%ss%>", second in two digits (00 to 59)
- "<%AM/PM%>", twelve-hour clock with the uppercase letters "AM" or "PM", as appropriate
- "<%loc_AM/PM%>", indicates the time marker such as AM or PM using the current user regional and language settings
- "<%loc_A/P%>", indicates the one character time marker such as A or P using the current user regional and language settings
- "<%loc_time%>", indicates the time using the current user regional and language settings
- "<%loc_time24%>", indicates the time in 24 hours format without a time marker using the current user regional and language settings
- "<%loc_tsep%>", indicates the time separator using the current user regional and language settings (:)
- "<%loc_y%>", represents the Year only by the last digit, using current regional settings
- "<%loc_yy%>", represents the Year only by the last two digits, using current regional settings. A leading zero is added for single-digit years.
- "<%loc_yyyy%>", represents the Year by a full four or five digits, depending on the calendar used. Thai Buddhist and Korean calendars have five-digit years. The "yyyy" pattern shows five digits for these two calendars, and four digits for all other supported calendars. Calendars that have single-digit or two-digit years, such as for the Japanese Emperor era, are represented differently. A single-digit year is represented with a leading zero, for example, "03". A two-digit year is represented with two digits, for example, "13". No additional leading zeros are displayed
Also, dayLabel property supports ex-HTML tags as follows:
- "<b>text</b>", displays the text in bold.
- "<li>text</li>", displays the text in italics.
- "<u>text</u>", underlines the text.
- "<s>text</s>", strike-through text
- "<a [id][;options]>text</a>", displays an anchor element that can be clicked
- "<font [family][;size]>text</font>", displays portions of text with a different font and/or different size.
- "<fgcolor color>text</fgcolor>", displays text with a specified foreground color.
- "<bgcolor color>text</bgcolor>", displays text with a specified background color.
- "<br>", defines a forced line-break
- "<r>", right aligns the text
- "<c>", centers the text
- "<img>key[:width]</img>", displays a custom-sized picture into the text. The key defines the name of the picture/image to be shown. The image can be added using the exontrol.HTMLPicture.Add() method.
- & glyph characters as "&" ( & ), "<" ( < ), ">" ( > ), "&qout;" ( quote character ) and "&#number;" ( the character with specified code ). For instance, "€" displays the EURO sign
- "<off offset>text</off>", defines the vertical offset to display the text.
- "<gra color[;mode[;blend]]>text</gra>", shows the text in gradient
- "<out color[;width]>text</out>", shows the text with outlined characters
- "<sha color[;width[;offset]]>text</sha>", shows the text with a shadow
-
Type
-
string
GetDayLabel
GetDayMonthAlign() → {exontrol.DrawTextFormatEnum}
The GetDayMonthAlign() method defines the format the month's label is being displayed, while the control shows days (day-view).
Returns:
Returns a exontrol.DrawTextFormatEnum value that defines the format the month's label is being displayed.
The exontrol.DrawTextFormatEnum type support the following flags:
- exTextAlignTop (0x00), justifies the text to the top of the rectangle
- exTextAlignLeft (0x00), aligns text to the left
- exTextAlignCenter (0x01), centers text horizontally in the rectangle
- exTextAlignRight (0x02), aligns text to the right
- exTextAlignVCenter (0x04), centers text vertically
- exTextAlignBottom (0x08), justifies the text to the bottom of the rectangle.
- exTextAlignMask (0x0F), specifies the mask for text's alignment.
- exTextWordBreak (0x10), breaks words. Lines are automatically broken between words if a word would extend past the edge of the rectangle specified by the lpRect parameter. A carriage return-line feed sequence also breaks the line. If this is not specified, output is on one line.
- exTextSingleLine (0x20), displays text on a single line only. Carriage returns and line feeds do not break the line.
- exTextExpandTabs (0x40), expands tab characters. The default number of characters per tab is eight.
- exPlainText (0x80), treats the text as plain text.
- exTextNoClip (0x0100), draws without clipping.
- exHTMLTextNoColors (0x0200), ignores the and tags.
- exTextCalcRect (0x0400), determines the width and height of the text.
- exHTMLTextNoTags (0x0800), ignores all HTML tags.
- exTextPathEllipsis (0x4000), for displayed text, replaces characters in the middle of the string with ellipses so that the result fits in the specified rectangle. If the string contains backslash (\) characters, exTextPathEllipsis preserves as much as possible of the text after the last backslash.
- exTextEndEllipsis (0x8000), for displayed text, if the end of a string does not fit in the rectangle, it is truncated and ellipses are added. If a word that is not at the end of the string goes beyond the limits of the rectangle, it is truncated without ellipses.
- exTextWordEllipsis (0x040000), truncates any word that does not fit in the rectangle and adds ellipses.
-
Type
-
exontrol.DrawTextFormatEnum
GetDayMonthAlign
The GetDayMonthHeader() method specifies whether the calendar shows the header to display the month-name (day-view only).
Returns:
Returns true, if the calendar shows the header to display the month-name (day-view only).
-
Type
-
string
GetDayMonthHeader
GetDayMonthLabel() → {string}
The GetDayMonthLabel() method defines the ex-HTML label to show the month-name into the calendar's header (day-view only).
Returns:
Returns the ex-HTML label to show the month-name into the calendar's header.
The dayMonthLabel property can include any of the following fields:
- "<%d%>", day of the month in one or two numeric digits, as needed (1 to 31)
- "<%dd%>", day of the month in two numeric digits (01 to 31)
- "<%d1%>", first letter of the weekday (S to S)"
- "<%loc_d1%>", indicates day of week as a one-letter abbreviation using the current user settings
- "<%d2%>", first two letters of the weekday (Su to Sa)
- "<%loc_d2%>", indicates day of week as a two-letters abbreviation using the current user settings
- "<%d3%>", first three letters of the weekday (Sun to Sat)
- "<%loc_d3%>", equivalent with "<%loc_ddd%>"
- "<%ddd%>", first three letters of the weekday (Sun to Sat)
- "<%loc_ddd%>", indicates the day of week as a three-letter abbreviation using the current user regional and language settings
- "<%dddd%>", full name of the weekday (Sunday to Saturday)
- "<%loc_dddd%>", indicates day of week as its full name using the current user regional and language settings
- "<%i%>", displays the number instead the date
- "<%w%>", day of the week (1 to 7)
- "<%ww%>", week of the year (1 to 53)
- "<%m%>", month of the year in one or two numeric digits, as needed (1 to 12)
- "<%mr%>", month of the year in Roman numerals, as needed (I to XII)
- "<%mm%>", month of the year in two numeric digits (01 to 12)
- "<%m1%>", first letter of the month (J to D)
- "<%loc_m1%>", indicates month as a one-letter abbreviation using the current user settings
- "<%m2%>", first two letters of the month (Ja to De)
- "<%loc_m2%>", indicates month as a two-letters abbreviation using the current user settings
- "<%m3%>", first three letters of the month (Jan to Dec)
- "<%loc_m3%>", equivalent with "<%loc_mmm%>"
- "<%mmm%>", first three letters of the month (Jan to Dec)
- "<%loc_mmm%>", indicates month as a three-letter abbreviation using the current user regional and language settings
- "<%mmmm%>", full name of the month (January to December)
- "<%loc_mmmm%>", indicates month as its full name using the current user regional and language settings
- "<%q%>", Date displayed as the quarter of the year (1 to 4)
- "<%y%>", number of the day of the year (1 to 366)
- "<%yy%>", last two digits of the year (01 to 99)
- "<%yyyy%>", full year (0100 to 9999)
- "<%hy%>", date displayed as the half of the year (1 to 2)
- "<%loc_g%>", indicates period/era using the current user regional and language settings
- "<%loc_gg%>", indicates period/era using the current user regional and language settings
- "<%loc_sdate%>", indicates the date in the short format using the current user regional and language settings
- "<%loc_ldate%>", indicates the date in the long format using the current user regional and language settings
- "<%loc_dsep%>", indicates the date separator using the current user regional and language settings (/)
- "<%h%>", hour in one or two digits, as needed (0 to 23)
- "<%hh%>", hour in two digits (00 to 23)
- "<%h12%>", hour in 12-hour time format, in one or two digits - [0(12),11]
- "<%hh12%>", hour in 12-hour time format, in two digits - [00(12),11]
- "<%n%>", minute in one or two digits, as needed (0 to 59)
- "<%nn%>", minute in two digits (00 to 59)
- "<%s%>", second in one or two digits, as needed (0 to 59)
- "<%ss%>", second in two digits (00 to 59)
- "<%AM/PM%>", twelve-hour clock with the uppercase letters "AM" or "PM", as appropriate
- "<%loc_AM/PM%>", indicates the time marker such as AM or PM using the current user regional and language settings
- "<%loc_A/P%>", indicates the one character time marker such as A or P using the current user regional and language settings
- "<%loc_time%>", indicates the time using the current user regional and language settings
- "<%loc_time24%>", indicates the time in 24 hours format without a time marker using the current user regional and language settings
- "<%loc_tsep%>", indicates the time separator using the current user regional and language settings (:)
- "<%loc_y%>", represents the Year only by the last digit, using current regional settings
- "<%loc_yy%>", represents the Year only by the last two digits, using current regional settings. A leading zero is added for single-digit years.
- "<%loc_yyyy%>", represents the Year by a full four or five digits, depending on the calendar used. Thai Buddhist and Korean calendars have five-digit years. The "yyyy" pattern shows five digits for these two calendars, and four digits for all other supported calendars. Calendars that have single-digit or two-digit years, such as for the Japanese Emperor era, are represented differently. A single-digit year is represented with a leading zero, for example, "03". A two-digit year is represented with two digits, for example, "13". No additional leading zeros are displayed
Also, dayWeekLabel property supports ex-HTML tags as follows:
- "<b>text</b>", displays the text in bold.
- "<li>text</li>", displays the text in italics.
- "<u>text</u>", underlines the text.
- "<s>text</s>", strike-through text
- "<a [id][;options]>text</a>", displays an anchor element that can be clicked
- "<font [family][;size]>text</font>", displays portions of text with a different font and/or different size.
- "<fgcolor color>text</fgcolor>", displays text with a specified foreground color.
- "<bgcolor color>text</bgcolor>", displays text with a specified background color.
- "<br>", defines a forced line-break
- "<r>", right aligns the text
- "<c>", centers the text
- "<img>key[:width]</img>", displays a custom-sized picture into the text. The key defines the name of the picture/image to be shown. The image can be added using the exontrol.HTMLPicture.Add() method.
- & glyph characters as "&" ( & ), "<" ( < ), ">" ( > ), "&qout;" ( quote character ) and "&#number;" ( the character with specified code ). For instance, "€" displays the EURO sign
- "<off offset>text</off>", defines the vertical offset to display the text.
- "<gra color[;mode[;blend]]>text</gra>", shows the text in gradient
- "<out color[;width]>text</out>", shows the text with outlined characters
- "<sha color[;width[;offset]]>text</sha>", shows the text with a shadow
-
Type
-
string
GetDayMonthLabel
GetDayNonMonth() → {boolean}
The GetDayNonMonth() method specifies whether the calendar displays the dates that are not part of the current month. (day-view only).
Returns:
Returns true, if the calendar displays the dates that are not part of the current month.
-
Type
-
boolean
GetDayNonMonth
GetDayNonMonthLabel() → {string}
The GetDayNonMonthLabel() method defines the ex-HTML label to show the dates that are not part of the current month (day-view only).
Returns:
Returns the ex-HTML label to show dates that are not part of the current month
The dayNonMonthLabel property can include any of the following fields:
- "<%d%>", day of the month in one or two numeric digits, as needed (1 to 31)
- "<%dd%>", day of the month in two numeric digits (01 to 31)
- "<%d1%>", first letter of the weekday (S to S)"
- "<%loc_d1%>", indicates day of week as a one-letter abbreviation using the current user settings
- "<%d2%>", first two letters of the weekday (Su to Sa)
- "<%loc_d2%>", indicates day of week as a two-letters abbreviation using the current user settings
- "<%d3%>", first three letters of the weekday (Sun to Sat)
- "<%loc_d3%>", equivalent with "<%loc_ddd%>"
- "<%ddd%>", first three letters of the weekday (Sun to Sat)
- "<%loc_ddd%>", indicates the day of week as a three-letter abbreviation using the current user regional and language settings
- "<%dddd%>", full name of the weekday (Sunday to Saturday)
- "<%loc_dddd%>", indicates day of week as its full name using the current user regional and language settings
- "<%i%>", displays the number instead the date
- "<%w%>", day of the week (1 to 7)
- "<%ww%>", week of the year (1 to 53)
- "<%m%>", month of the year in one or two numeric digits, as needed (1 to 12)
- "<%mr%>", month of the year in Roman numerals, as needed (I to XII)
- "<%mm%>", month of the year in two numeric digits (01 to 12)
- "<%m1%>", first letter of the month (J to D)
- "<%loc_m1%>", indicates month as a one-letter abbreviation using the current user settings
- "<%m2%>", first two letters of the month (Ja to De)
- "<%loc_m2%>", indicates month as a two-letters abbreviation using the current user settings
- "<%m3%>", first three letters of the month (Jan to Dec)
- "<%loc_m3%>", equivalent with "<%loc_mmm%>"
- "<%mmm%>", first three letters of the month (Jan to Dec)
- "<%loc_mmm%>", indicates month as a three-letter abbreviation using the current user regional and language settings
- "<%mmmm%>", full name of the month (January to December)
- "<%loc_mmmm%>", indicates month as its full name using the current user regional and language settings
- "<%q%>", Date displayed as the quarter of the year (1 to 4)
- "<%y%>", number of the day of the year (1 to 366)
- "<%yy%>", last two digits of the year (01 to 99)
- "<%yyyy%>", full year (0100 to 9999)
- "<%hy%>", date displayed as the half of the year (1 to 2)
- "<%loc_g%>", indicates period/era using the current user regional and language settings
- "<%loc_gg%>", indicates period/era using the current user regional and language settings
- "<%loc_sdate%>", indicates the date in the short format using the current user regional and language settings
- "<%loc_ldate%>", indicates the date in the long format using the current user regional and language settings
- "<%loc_dsep%>", indicates the date separator using the current user regional and language settings (/)
- "<%h%>", hour in one or two digits, as needed (0 to 23)
- "<%hh%>", hour in two digits (00 to 23)
- "<%h12%>", hour in 12-hour time format, in one or two digits - [0(12),11]
- "<%hh12%>", hour in 12-hour time format, in two digits - [00(12),11]
- "<%n%>", minute in one or two digits, as needed (0 to 59)
- "<%nn%>", minute in two digits (00 to 59)
- "<%s%>", second in one or two digits, as needed (0 to 59)
- "<%ss%>", second in two digits (00 to 59)
- "<%AM/PM%>", twelve-hour clock with the uppercase letters "AM" or "PM", as appropriate
- "<%loc_AM/PM%>", indicates the time marker such as AM or PM using the current user regional and language settings
- "<%loc_A/P%>", indicates the one character time marker such as A or P using the current user regional and language settings
- "<%loc_time%>", indicates the time using the current user regional and language settings
- "<%loc_time24%>", indicates the time in 24 hours format without a time marker using the current user regional and language settings
- "<%loc_tsep%>", indicates the time separator using the current user regional and language settings (:)
- "<%loc_y%>", represents the Year only by the last digit, using current regional settings
- "<%loc_yy%>", represents the Year only by the last two digits, using current regional settings. A leading zero is added for single-digit years.
- "<%loc_yyyy%>", represents the Year by a full four or five digits, depending on the calendar used. Thai Buddhist and Korean calendars have five-digit years. The "yyyy" pattern shows five digits for these two calendars, and four digits for all other supported calendars. Calendars that have single-digit or two-digit years, such as for the Japanese Emperor era, are represented differently. A single-digit year is represented with a leading zero, for example, "03". A two-digit year is represented with two digits, for example, "13". No additional leading zeros are displayed
Also, dayWeekLabel property supports ex-HTML tags as follows:
- "<b>text</b>", displays the text in bold.
- "<li>text</li>", displays the text in italics.
- "<u>text</u>", underlines the text.
- "<s>text</s>", strike-through text
- "<a [id][;options]>text</a>", displays an anchor element that can be clicked
- "<font [family][;size]>text</font>", displays portions of text with a different font and/or different size.
- "<fgcolor color>text</fgcolor>", displays text with a specified foreground color.
- "<bgcolor color>text</bgcolor>", displays text with a specified background color.
- "<br>", defines a forced line-break
- "<r>", right aligns the text
- "<c>", centers the text
- "<img>key[:width]</img>", displays a custom-sized picture into the text. The key defines the name of the picture/image to be shown. The image can be added using the exontrol.HTMLPicture.Add() method.
- & glyph characters as "&" ( & ), "<" ( < ), ">" ( > ), "&qout;" ( quote character ) and "&#number;" ( the character with specified code ). For instance, "€" displays the EURO sign
- "<off offset>text</off>", defines the vertical offset to display the text.
- "<gra color[;mode[;blend]]>text</gra>", shows the text in gradient
- "<out color[;width]>text</out>", shows the text with outlined characters
- "<sha color[;width[;offset]]>text</sha>", shows the text with a shadow
-
Type
-
string
GetDayNonMonthLabel
GetDayWeekAllLabel() → {string}
The GetDayWeekAllLabel() method defines the ex-HTML label to show the first day of the month on the top-left corner of the calendar, when the week-number and week-days headers are present (day-view only).
Returns:
Returns the ex-HTML label to show the first day of the month on the top-left corner of the calendar, when the week-number and week-days headers are present
The dayWeekAllLabel property can include any of the following fields:
- "<%d%>", day of the month in one or two numeric digits, as needed (1 to 31)
- "<%dd%>", day of the month in two numeric digits (01 to 31)
- "<%d1%>", first letter of the weekday (S to S)"
- "<%loc_d1%>", indicates day of week as a one-letter abbreviation using the current user settings
- "<%d2%>", first two letters of the weekday (Su to Sa)
- "<%loc_d2%>", indicates day of week as a two-letters abbreviation using the current user settings
- "<%d3%>", first three letters of the weekday (Sun to Sat)
- "<%loc_d3%>", equivalent with "<%loc_ddd%>"
- "<%ddd%>", first three letters of the weekday (Sun to Sat)
- "<%loc_ddd%>", indicates the day of week as a three-letter abbreviation using the current user regional and language settings
- "<%dddd%>", full name of the weekday (Sunday to Saturday)
- "<%loc_dddd%>", indicates day of week as its full name using the current user regional and language settings
- "<%i%>", displays the number instead the date
- "<%w%>", day of the week (1 to 7)
- "<%ww%>", week of the year (1 to 53)
- "<%m%>", month of the year in one or two numeric digits, as needed (1 to 12)
- "<%mr%>", month of the year in Roman numerals, as needed (I to XII)
- "<%mm%>", month of the year in two numeric digits (01 to 12)
- "<%m1%>", first letter of the month (J to D)
- "<%loc_m1%>", indicates month as a one-letter abbreviation using the current user settings
- "<%m2%>", first two letters of the month (Ja to De)
- "<%loc_m2%>", indicates month as a two-letters abbreviation using the current user settings
- "<%m3%>", first three letters of the month (Jan to Dec)
- "<%loc_m3%>", equivalent with "<%loc_mmm%>"
- "<%mmm%>", first three letters of the month (Jan to Dec)
- "<%loc_mmm%>", indicates month as a three-letter abbreviation using the current user regional and language settings
- "<%mmmm%>", full name of the month (January to December)
- "<%loc_mmmm%>", indicates month as its full name using the current user regional and language settings
- "<%q%>", Date displayed as the quarter of the year (1 to 4)
- "<%y%>", number of the day of the year (1 to 366)
- "<%yy%>", last two digits of the year (01 to 99)
- "<%yyyy%>", full year (0100 to 9999)
- "<%hy%>", date displayed as the half of the year (1 to 2)
- "<%loc_g%>", indicates period/era using the current user regional and language settings
- "<%loc_gg%>", indicates period/era using the current user regional and language settings
- "<%loc_sdate%>", indicates the date in the short format using the current user regional and language settings
- "<%loc_ldate%>", indicates the date in the long format using the current user regional and language settings
- "<%loc_dsep%>", indicates the date separator using the current user regional and language settings (/)
- "<%h%>", hour in one or two digits, as needed (0 to 23)
- "<%hh%>", hour in two digits (00 to 23)
- "<%h12%>", hour in 12-hour time format, in one or two digits - [0(12),11]
- "<%hh12%>", hour in 12-hour time format, in two digits - [00(12),11]
- "<%n%>", minute in one or two digits, as needed (0 to 59)
- "<%nn%>", minute in two digits (00 to 59)
- "<%s%>", second in one or two digits, as needed (0 to 59)
- "<%ss%>", second in two digits (00 to 59)
- "<%AM/PM%>", twelve-hour clock with the uppercase letters "AM" or "PM", as appropriate
- "<%loc_AM/PM%>", indicates the time marker such as AM or PM using the current user regional and language settings
- "<%loc_A/P%>", indicates the one character time marker such as A or P using the current user regional and language settings
- "<%loc_time%>", indicates the time using the current user regional and language settings
- "<%loc_time24%>", indicates the time in 24 hours format without a time marker using the current user regional and language settings
- "<%loc_tsep%>", indicates the time separator using the current user regional and language settings (:)
- "<%loc_y%>", represents the Year only by the last digit, using current regional settings
- "<%loc_yy%>", represents the Year only by the last two digits, using current regional settings. A leading zero is added for single-digit years.
- "<%loc_yyyy%>", represents the Year by a full four or five digits, depending on the calendar used. Thai Buddhist and Korean calendars have five-digit years. The "yyyy" pattern shows five digits for these two calendars, and four digits for all other supported calendars. Calendars that have single-digit or two-digit years, such as for the Japanese Emperor era, are represented differently. A single-digit year is represented with a leading zero, for example, "03". A two-digit year is represented with two digits, for example, "13". No additional leading zeros are displayed
Also, dayWeekLabel property supports ex-HTML tags as follows:
- "<b>text</b>", displays the text in bold.
- "<li>text</li>", displays the text in italics.
- "<u>text</u>", underlines the text.
- "<s>text</s>", strike-through text
- "<a [id][;options]>text</a>", displays an anchor element that can be clicked
- "<font [family][;size]>text</font>", displays portions of text with a different font and/or different size.
- "<fgcolor color>text</fgcolor>", displays text with a specified foreground color.
- "<bgcolor color>text</bgcolor>", displays text with a specified background color.
- "<br>", defines a forced line-break
- "<r>", right aligns the text
- "<c>", centers the text
- "<img>key[:width]</img>", displays a custom-sized picture into the text. The key defines the name of the picture/image to be shown. The image can be added using the exontrol.HTMLPicture.Add() method.
- & glyph characters as "&" ( & ), "<" ( < ), ">" ( > ), "&qout;" ( quote character ) and "&#number;" ( the character with specified code ). For instance, "€" displays the EURO sign
- "<off offset>text</off>", defines the vertical offset to display the text.
- "<gra color[;mode[;blend]]>text</gra>", shows the text in gradient
- "<out color[;width]>text</out>", shows the text with outlined characters
- "<sha color[;width[;offset]]>text</sha>", shows the text with a shadow
-
Type
-
string
GetDayWeekAllLabel
The GetDayWeekHeader() method specifies whether the calendar shows the header to display the days of the week (day-view only).
Returns:
Returns true, if the calendar shows the header to display the days of the week (day-view only).
-
Type
-
boolean
GetDayWeekHeader
GetDayWeekLabel() → {string}
The GetDayWeekLabel() method defines the ex-HTML label to show the days of the week into the calendar's header (day-view only).
Returns:
Returns the ex-HTML label to show the days of the week into the calendar's header.
The dayWeekLabel property can include any of the following fields:
- "<%d%>", day of the month in one or two numeric digits, as needed (1 to 31)
- "<%dd%>", day of the month in two numeric digits (01 to 31)
- "<%d1%>", first letter of the weekday (S to S)"
- "<%loc_d1%>", indicates day of week as a one-letter abbreviation using the current user settings
- "<%d2%>", first two letters of the weekday (Su to Sa)
- "<%loc_d2%>", indicates day of week as a two-letters abbreviation using the current user settings
- "<%d3%>", first three letters of the weekday (Sun to Sat)
- "<%loc_d3%>", equivalent with "<%loc_ddd%>"
- "<%ddd%>", first three letters of the weekday (Sun to Sat)
- "<%loc_ddd%>", indicates the day of week as a three-letter abbreviation using the current user regional and language settings
- "<%dddd%>", full name of the weekday (Sunday to Saturday)
- "<%loc_dddd%>", indicates day of week as its full name using the current user regional and language settings
- "<%i%>", displays the number instead the date
- "<%w%>", day of the week (1 to 7)
- "<%ww%>", week of the year (1 to 53)
- "<%m%>", month of the year in one or two numeric digits, as needed (1 to 12)
- "<%mr%>", month of the year in Roman numerals, as needed (I to XII)
- "<%mm%>", month of the year in two numeric digits (01 to 12)
- "<%m1%>", first letter of the month (J to D)
- "<%loc_m1%>", indicates month as a one-letter abbreviation using the current user settings
- "<%m2%>", first two letters of the month (Ja to De)
- "<%loc_m2%>", indicates month as a two-letters abbreviation using the current user settings
- "<%m3%>", first three letters of the month (Jan to Dec)
- "<%loc_m3%>", equivalent with "<%loc_mmm%>"
- "<%mmm%>", first three letters of the month (Jan to Dec)
- "<%loc_mmm%>", indicates month as a three-letter abbreviation using the current user regional and language settings
- "<%mmmm%>", full name of the month (January to December)
- "<%loc_mmmm%>", indicates month as its full name using the current user regional and language settings
- "<%q%>", Date displayed as the quarter of the year (1 to 4)
- "<%y%>", number of the day of the year (1 to 366)
- "<%yy%>", last two digits of the year (01 to 99)
- "<%yyyy%>", full year (0100 to 9999)
- "<%hy%>", date displayed as the half of the year (1 to 2)
- "<%loc_g%>", indicates period/era using the current user regional and language settings
- "<%loc_gg%>", indicates period/era using the current user regional and language settings
- "<%loc_sdate%>", indicates the date in the short format using the current user regional and language settings
- "<%loc_ldate%>", indicates the date in the long format using the current user regional and language settings
- "<%loc_dsep%>", indicates the date separator using the current user regional and language settings (/)
- "<%h%>", hour in one or two digits, as needed (0 to 23)
- "<%hh%>", hour in two digits (00 to 23)
- "<%h12%>", hour in 12-hour time format, in one or two digits - [0(12),11]
- "<%hh12%>", hour in 12-hour time format, in two digits - [00(12),11]
- "<%n%>", minute in one or two digits, as needed (0 to 59)
- "<%nn%>", minute in two digits (00 to 59)
- "<%s%>", second in one or two digits, as needed (0 to 59)
- "<%ss%>", second in two digits (00 to 59)
- "<%AM/PM%>", twelve-hour clock with the uppercase letters "AM" or "PM", as appropriate
- "<%loc_AM/PM%>", indicates the time marker such as AM or PM using the current user regional and language settings
- "<%loc_A/P%>", indicates the one character time marker such as A or P using the current user regional and language settings
- "<%loc_time%>", indicates the time using the current user regional and language settings
- "<%loc_time24%>", indicates the time in 24 hours format without a time marker using the current user regional and language settings
- "<%loc_tsep%>", indicates the time separator using the current user regional and language settings (:)
- "<%loc_y%>", represents the Year only by the last digit, using current regional settings
- "<%loc_yy%>", represents the Year only by the last two digits, using current regional settings. A leading zero is added for single-digit years.
- "<%loc_yyyy%>", represents the Year by a full four or five digits, depending on the calendar used. Thai Buddhist and Korean calendars have five-digit years. The "yyyy" pattern shows five digits for these two calendars, and four digits for all other supported calendars. Calendars that have single-digit or two-digit years, such as for the Japanese Emperor era, are represented differently. A single-digit year is represented with a leading zero, for example, "03". A two-digit year is represented with two digits, for example, "13". No additional leading zeros are displayed
Also, dayWeekLabel property supports ex-HTML tags as follows:
- "<b>text</b>", displays the text in bold.
- "<li>text</li>", displays the text in italics.
- "<u>text</u>", underlines the text.
- "<s>text</s>", strike-through text
- "<a [id][;options]>text</a>", displays an anchor element that can be clicked
- "<font [family][;size]>text</font>", displays portions of text with a different font and/or different size.
- "<fgcolor color>text</fgcolor>", displays text with a specified foreground color.
- "<bgcolor color>text</bgcolor>", displays text with a specified background color.
- "<br>", defines a forced line-break
- "<r>", right aligns the text
- "<c>", centers the text
- "<img>key[:width]</img>", displays a custom-sized picture into the text. The key defines the name of the picture/image to be shown. The image can be added using the exontrol.HTMLPicture.Add() method.
- & glyph characters as "&" ( & ), "<" ( < ), ">" ( > ), "&qout;" ( quote character ) and "&#number;" ( the character with specified code ). For instance, "€" displays the EURO sign
- "<off offset>text</off>", defines the vertical offset to display the text.
- "<gra color[;mode[;blend]]>text</gra>", shows the text in gradient
- "<out color[;width]>text</out>", shows the text with outlined characters
- "<sha color[;width[;offset]]>text</sha>", shows the text with a shadow
-
Type
-
string
GetDayWeekLabel
The GetDayWeekNoHeader() method specifies whether the calendar shows the header to display the week-number (day-view only).
Returns:
Returns true, if the calendar shows the header to display the week-number (day-view only).
-
Type
-
string
GetDayWeekNoHeader
GetDayWeekNoLabel() → {string}
The GetDayWeekNoLabel() method defines the ex-HTML label to show the week-number into the calendar's header (day-view only).
Returns:
Returns the ex-HTML label to show the week-number into the calendar's header.
The dayWeekNoLabel property can include any of the following fields:
- "<%d%>", day of the month in one or two numeric digits, as needed (1 to 31)
- "<%dd%>", day of the month in two numeric digits (01 to 31)
- "<%d1%>", first letter of the weekday (S to S)"
- "<%loc_d1%>", indicates day of week as a one-letter abbreviation using the current user settings
- "<%d2%>", first two letters of the weekday (Su to Sa)
- "<%loc_d2%>", indicates day of week as a two-letters abbreviation using the current user settings
- "<%d3%>", first three letters of the weekday (Sun to Sat)
- "<%loc_d3%>", equivalent with "<%loc_ddd%>"
- "<%ddd%>", first three letters of the weekday (Sun to Sat)
- "<%loc_ddd%>", indicates the day of week as a three-letter abbreviation using the current user regional and language settings
- "<%dddd%>", full name of the weekday (Sunday to Saturday)
- "<%loc_dddd%>", indicates day of week as its full name using the current user regional and language settings
- "<%i%>", displays the number instead the date
- "<%w%>", day of the week (1 to 7)
- "<%ww%>", week of the year (1 to 53)
- "<%m%>", month of the year in one or two numeric digits, as needed (1 to 12)
- "<%mr%>", month of the year in Roman numerals, as needed (I to XII)
- "<%mm%>", month of the year in two numeric digits (01 to 12)
- "<%m1%>", first letter of the month (J to D)
- "<%loc_m1%>", indicates month as a one-letter abbreviation using the current user settings
- "<%m2%>", first two letters of the month (Ja to De)
- "<%loc_m2%>", indicates month as a two-letters abbreviation using the current user settings
- "<%m3%>", first three letters of the month (Jan to Dec)
- "<%loc_m3%>", equivalent with "<%loc_mmm%>"
- "<%mmm%>", first three letters of the month (Jan to Dec)
- "<%loc_mmm%>", indicates month as a three-letter abbreviation using the current user regional and language settings
- "<%mmmm%>", full name of the month (January to December)
- "<%loc_mmmm%>", indicates month as its full name using the current user regional and language settings
- "<%q%>", Date displayed as the quarter of the year (1 to 4)
- "<%y%>", number of the day of the year (1 to 366)
- "<%yy%>", last two digits of the year (01 to 99)
- "<%yyyy%>", full year (0100 to 9999)
- "<%hy%>", date displayed as the half of the year (1 to 2)
- "<%loc_g%>", indicates period/era using the current user regional and language settings
- "<%loc_gg%>", indicates period/era using the current user regional and language settings
- "<%loc_sdate%>", indicates the date in the short format using the current user regional and language settings
- "<%loc_ldate%>", indicates the date in the long format using the current user regional and language settings
- "<%loc_dsep%>", indicates the date separator using the current user regional and language settings (/)
- "<%h%>", hour in one or two digits, as needed (0 to 23)
- "<%hh%>", hour in two digits (00 to 23)
- "<%h12%>", hour in 12-hour time format, in one or two digits - [0(12),11]
- "<%hh12%>", hour in 12-hour time format, in two digits - [00(12),11]
- "<%n%>", minute in one or two digits, as needed (0 to 59)
- "<%nn%>", minute in two digits (00 to 59)
- "<%s%>", second in one or two digits, as needed (0 to 59)
- "<%ss%>", second in two digits (00 to 59)
- "<%AM/PM%>", twelve-hour clock with the uppercase letters "AM" or "PM", as appropriate
- "<%loc_AM/PM%>", indicates the time marker such as AM or PM using the current user regional and language settings
- "<%loc_A/P%>", indicates the one character time marker such as A or P using the current user regional and language settings
- "<%loc_time%>", indicates the time using the current user regional and language settings
- "<%loc_time24%>", indicates the time in 24 hours format without a time marker using the current user regional and language settings
- "<%loc_tsep%>", indicates the time separator using the current user regional and language settings (:)
- "<%loc_y%>", represents the Year only by the last digit, using current regional settings
- "<%loc_yy%>", represents the Year only by the last two digits, using current regional settings. A leading zero is added for single-digit years.
- "<%loc_yyyy%>", represents the Year by a full four or five digits, depending on the calendar used. Thai Buddhist and Korean calendars have five-digit years. The "yyyy" pattern shows five digits for these two calendars, and four digits for all other supported calendars. Calendars that have single-digit or two-digit years, such as for the Japanese Emperor era, are represented differently. A single-digit year is represented with a leading zero, for example, "03". A two-digit year is represented with two digits, for example, "13". No additional leading zeros are displayed
Also, dayWeekLabel property supports ex-HTML tags as follows:
- "<b>text</b>", displays the text in bold.
- "<li>text</li>", displays the text in italics.
- "<u>text</u>", underlines the text.
- "<s>text</s>", strike-through text
- "<a [id][;options]>text</a>", displays an anchor element that can be clicked
- "<font [family][;size]>text</font>", displays portions of text with a different font and/or different size.
- "<fgcolor color>text</fgcolor>", displays text with a specified foreground color.
- "<bgcolor color>text</bgcolor>", displays text with a specified background color.
- "<br>", defines a forced line-break
- "<r>", right aligns the text
- "<c>", centers the text
- "<img>key[:width]</img>", displays a custom-sized picture into the text. The key defines the name of the picture/image to be shown. The image can be added using the exontrol.HTMLPicture.Add() method.
- & glyph characters as "&" ( & ), "<" ( < ), ">" ( > ), "&qout;" ( quote character ) and "&#number;" ( the character with specified code ). For instance, "€" displays the EURO sign
- "<off offset>text</off>", defines the vertical offset to display the text.
- "<gra color[;mode[;blend]]>text</gra>", shows the text in gradient
- "<out color[;width]>text</out>", shows the text with outlined characters
- "<sha color[;width[;offset]]>text</sha>", shows the text with a shadow
-
Type
-
string
GetDayWeekNoLabel
GetEvents() → {Events}
The GetEvents() method returns the control's events.
- Since:
Returns:
Returns an object of Events type.
-
Type
-
Events
Example
The following statements are equivalents:
oCalendar.GetEvents(), returns the control's events
oCalendar.Events, returns the control's events
where oCalendar is an object of Calendar type
GetEvents
The GetFlow() method determines whether the months gets arranged from left to right or top to bottom.
Returns:
Returns an Calendar.FlowEnum that specifies how the months gets arranged. If null, the flow field determines the flow to arrange the month as: if horizontally the flow is left to right, else top to bottom.
The Calendar.FlowEnum type supports the following values:
- exLeftToRight(0), indicates that the next month gets arranged to the right of the current month
- exTopToBottom(1), indicates that the next month gets arranged to the bottom of the current month
-
Type
-
Calendar.FlowEnum
GetFlow
GetHlShapes() → {string}
The GetHlShapes() method defines the shape(s) to be applied on a part of the control, when it requires to be highlighted
Returns:
A string expression that defines the shape(s) to be applied on a part of the control, when it requires to be highlighted
The format of shapes property is:
"shape(part),shape(part),..."
where:
- "shape", defines the shape to apply on the UI part as one of the following:
◦ any of 140 color names any browser supports (such as red, blue, green, ...)
◦ hexadecimal colors, is specified with: #RRGGBB, where the RR (red), GG (green) and BB (blue) hexadecimal integers specify the components of the color. All values must be between 00 and FF (such as #0000ff which defines a blue background)
◦ hexadecimal colors with transparency, is specified with: #RRGGBBAA, where AA (alpha) value must be between 00 and FF (such as #0000ff80 which defines a semi-transparent blue background)
◦ RGB colors, is specified with the RGB(red, green, blue) function. Each parameter (red, green, and blue) defines the intensity of the color and can be an integer between 0 and 255( such as rgb(0,0,255) that defines a blue background)
◦ RGBA colors, are an extension of RGB color values with an alpha channel as RGBA(red, green, blue, alpha) function, where the alpha parameter is a number between 0.0 (fully transparent) and 1.0 (fully opaque) ( such as rgba(0,0,255,0.5) which defines a semi-transparent blue background)
◦ HSL colors, is specified with the HSL(hue, saturation, lightness) function, where hue is a degree on the color wheel (from 0 to 360) - 0 (or 360) is red, 120 is green, 240 is blue. saturation is a percentage value; 0% means a shade of gray and 100% is the full color. lightness is also a percentage; 0% is black, 100% is white. HSL stands for hue, saturation, and lightness - and represents a cylindrical-coordinate representation of colors (such as hsl(240, 100%, 50%) that defines a blue background)
◦ HSLA colors, are an extension of HSL color values with an alpha channel - which specifies the opacity of the object as HSLA(hue, saturation, lightness, alpha) function, where alpha parameter is a number between 0.0 (fully transparent) and 1.0 (fully opaque) (such as hsla(240, 100%, 50%,0.5) that defines a semi-transparent blue background)
◦ a JSON representation of the shape object to apply (while it starts with { character, such as '{"normal": {"primitive": "RoundRect","fillColor":"black","tfi": {"fgColor": "white"}}}')
◦ specifies the name of the field within the exontrol.Shapes.Calendar object (while it starts with a lowercase letter, such as today which refers to exontrol.Shapes.Calendar.today shape)
◦ specifies the name of the field within the exontrol.Shapes object (while it starts with an uppercase letter, such as Button which refers to exontrol.Shapes.Button shape)
- "part", defines the name of the part the shape is applied on (as defined bellow)
The shapes property supports any of the following parts:
- "p" (prev), defines the prev button (available for any view)
- "n" (next), defines the next button (available for any view)
The following parts are available while the control displays the day-view:
- "da" (day-all), indicates all objects of the month.
- "dmh" (day-month-header) object that indicates the header that displays the month
- "dm" (days-month) specifies all days displayed in the current month ( it can include also non-month days as well )
- "d" (day), specifies a day of the current month
- "dnm" (day-non-month), specifies a day that is not part of the current month, but it is still displayed
- "dt" (today), specifies today in the current month
- "ds" (day-select), indicates a selected date
- "de" (week-end), specifies a day of weekend
- "dwa" (day-weeks-all) indicates the top-left corner object, when the week-header and week-number headers are visible
- "dwh" (day-week-header) indicates the header that shows the days of the week
- "dw" (day-week) specifies a day into the week-header
- "dwnh" (day-week-number-header) indicates the header that displays the week-numbers
- "dwn" (day-week-number) specifies the week-number
- "dwnn" (day-week-number-non-month) specifies the week-number that is not part of the current month
The following parts are available while the control displays the month-view:
- "ma" (month-all) specifies the area to display the entire year
- "mh" (month-header) indicates the header for month-view (it displays the year)
- "mm" (month-month) indicates the portion of the layout that displays the months of the year (excludes its header)
- "m" (month) specifies a single month within the month-view
- "mt" (month-today), indicates the current month (the month that contains today)
- "ms" (month-select), indicates a month that contains a selected date
The following parts are available while the control displays the year-view:
- "ya" (year-all) that specifies the area to display the entire layout
- "yh" (year-header) that indicates the header for year-view (it displays the range of years)
- "yy" (year-years) that indicates the portion of the layout that displays the years (excludes its header)
- "y" (year) that specifies a single year within the year-view
- "yt" (year-today), specifies the year of today
- "ys" (year-select), indicates a year that contains a selected date
-
Type
-
string
GetHlShapes
GetLayout(oOptsopt) → {string}
The GetLayout() method saves the UI layout of the object to an encoded string. The layout can be restored using the SetLayout() method
Parameters:
Name |
Type |
Attributes |
Description |
oOpts |
object
|
<optional>
|
An object of {iMask,eMask,base64,equal,eol} type that defines options to serialize the properties of the container as explained bellow:
- iMask {string}, specifies the mask (can include ? or * wild-characters) of properties to save
- eMask {string}, specifies the mask (can include ? or * wild-characters) of properties to exclude from save
- base64 {boolean}, Encodes the result to BASE 64
- equal {string}, Indicates the separator between the name and the value. If missing, the = character is used
- eol {string}, A character that separates the properties. By default it is "\n"
|
- Since:
Returns:
Returns a string that encodes the current UI layout for the entire object
-
Type
-
string
Example
The following statements are equivalents:
oCalendar.GetLayout(), gets the control's layout
oCalendar.Layout, gets the control's layout
where oCalendar is an object of Calendar type
GetLayout
GetLocale() → {string}
The GetLocale() method determines the language to format the calendar.
Returns:
A string with a BCP 47 language tag, or null to specify the browser's UI language.
-
Type
-
string
GetLocale
GetLocked() → {boolean}
The GetLocked() method specifies whether the control is locked(protected) or unlocked
Returns:
Returns true, if the control is locked(protected) or unlocked
-
Type
-
boolean
GetLocked
GetMaxMonthX() → {number}
The GetMaxMonthX() method specifies the maximum number of months horizontally displayed.
Returns:
Returns the maximum number of months horizontally displayed.
-
Type
-
number
GetMaxMonthX
GetMaxMonthY() → {number}
The GetMaxMonthY() method specifies the maximum number of months vertically displayed.
Returns:
Returns the maximum number of months vertically displayed.
-
Type
-
number
GetMaxMonthY
GetMinMonthX() → {number}
The GetMinMonthX() method specifies the minimum number of months horizontally displayed.
Returns:
Returns the minimum number of months horizontally displayed.
-
Type
-
number
GetMinMonthX
GetMinMonthY() → {number}
The GetMinMonthY() method specifies the minimum number of months vertically displayed.
Returns:
Returns the minimum number of months vertically displayed.
-
Type
-
number
GetMinMonthY
The GetMode() method specifies the orientation the calendar displays the days of the weeks
Returns:
Returns an Calendar.ModeEnum that specifies the orientation the calendar displays the days of the weeks
The Calendar.ModeEnum type supports the following values:
- exVertical(0), specifies that the days of the week are vertically arranged
- exHorizontal(1), specifies that the days of the week are horizontally arranged
-
Type
-
Calendar.ModeEnum
GetMode
GetMonthAlign() → {exontrol.DrawTextFormatEnum}
The GetMonthAlign() method defines the format the month's label is being displayed, while the control displays the month-view.
Returns:
Returns a exontrol.DrawTextFormatEnum value that defines the format the month's label is being displayed.
The exontrol.DrawTextFormatEnum type support the following flags:
- exTextAlignTop (0x00), justifies the text to the top of the rectangle
- exTextAlignLeft (0x00), aligns text to the left
- exTextAlignCenter (0x01), centers text horizontally in the rectangle
- exTextAlignRight (0x02), aligns text to the right
- exTextAlignVCenter (0x04), centers text vertically
- exTextAlignBottom (0x08), justifies the text to the bottom of the rectangle.
- exTextAlignMask (0x0F), specifies the mask for text's alignment.
- exTextWordBreak (0x10), breaks words. Lines are automatically broken between words if a word would extend past the edge of the rectangle specified by the lpRect parameter. A carriage return-line feed sequence also breaks the line. If this is not specified, output is on one line.
- exTextSingleLine (0x20), displays text on a single line only. Carriage returns and line feeds do not break the line.
- exTextExpandTabs (0x40), expands tab characters. The default number of characters per tab is eight.
- exPlainText (0x80), treats the text as plain text.
- exTextNoClip (0x0100), draws without clipping.
- exHTMLTextNoColors (0x0200), ignores the and tags.
- exTextCalcRect (0x0400), determines the width and height of the text.
- exHTMLTextNoTags (0x0800), ignores all HTML tags.
- exTextPathEllipsis (0x4000), for displayed text, replaces characters in the middle of the string with ellipses so that the result fits in the specified rectangle. If the string contains backslash (\) characters, exTextPathEllipsis preserves as much as possible of the text after the last backslash.
- exTextEndEllipsis (0x8000), for displayed text, if the end of a string does not fit in the rectangle, it is truncated and ellipses are added. If a word that is not at the end of the string goes beyond the limits of the rectangle, it is truncated without ellipses.
- exTextWordEllipsis (0x040000), truncates any word that does not fit in the rectangle and adds ellipses.
-
Type
-
exontrol.DrawTextFormatEnum
GetMonthAlign
GetMonthLabel() → {string}
The GetMonthLabel() method indicates a HTML string that can include expression fields (<%...%>) to display the month while the control displays the month-view.
Returns:
Returns a string that specifies a HTML string that can include expression fields (<%...%>) to display the month while the control displays the month-view.
The monthLabel property can include any of the following fields:
- "<%d%>", day of the month in one or two numeric digits, as needed (1 to 31)
- "<%dd%>", day of the month in two numeric digits (01 to 31)
- "<%d1%>", first letter of the weekday (S to S)"
- "<%loc_d1%>", indicates day of week as a one-letter abbreviation using the current user settings
- "<%d2%>", first two letters of the weekday (Su to Sa)
- "<%loc_d2%>", indicates day of week as a two-letters abbreviation using the current user settings
- "<%d3%>", first three letters of the weekday (Sun to Sat)
- "<%loc_d3%>", equivalent with "<%loc_ddd%>"
- "<%ddd%>", first three letters of the weekday (Sun to Sat)
- "<%loc_ddd%>", indicates the day of week as a three-letter abbreviation using the current user regional and language settings
- "<%dddd%>", full name of the weekday (Sunday to Saturday)
- "<%loc_dddd%>", indicates day of week as its full name using the current user regional and language settings
- "<%i%>", displays the number instead the date
- "<%w%>", day of the week (1 to 7)
- "<%ww%>", week of the year (1 to 53)
- "<%m%>", month of the year in one or two numeric digits, as needed (1 to 12)
- "<%mr%>", month of the year in Roman numerals, as needed (I to XII)
- "<%mm%>", month of the year in two numeric digits (01 to 12)
- "<%m1%>", first letter of the month (J to D)
- "<%loc_m1%>", indicates month as a one-letter abbreviation using the current user settings
- "<%m2%>", first two letters of the month (Ja to De)
- "<%loc_m2%>", indicates month as a two-letters abbreviation using the current user settings
- "<%m3%>", first three letters of the month (Jan to Dec)
- "<%loc_m3%>", equivalent with "<%loc_mmm%>"
- "<%mmm%>", first three letters of the month (Jan to Dec)
- "<%loc_mmm%>", indicates month as a three-letter abbreviation using the current user regional and language settings
- "<%mmmm%>", full name of the month (January to December)
- "<%loc_mmmm%>", indicates month as its full name using the current user regional and language settings
- "<%q%>", Date displayed as the quarter of the year (1 to 4)
- "<%y%>", number of the day of the year (1 to 366)
- "<%yy%>", last two digits of the year (01 to 99)
- "<%yyyy%>", full year (0100 to 9999)
- "<%hy%>", date displayed as the half of the year (1 to 2)
- "<%loc_g%>", indicates period/era using the current user regional and language settings
- "<%loc_gg%>", indicates period/era using the current user regional and language settings
- "<%loc_sdate%>", indicates the date in the short format using the current user regional and language settings
- "<%loc_ldate%>", indicates the date in the long format using the current user regional and language settings
- "<%loc_dsep%>", indicates the date separator using the current user regional and language settings (/)
- "<%h%>", hour in one or two digits, as needed (0 to 23)
- "<%hh%>", hour in two digits (00 to 23)
- "<%h12%>", hour in 12-hour time format, in one or two digits - [0(12),11]
- "<%hh12%>", hour in 12-hour time format, in two digits - [00(12),11]
- "<%n%>", minute in one or two digits, as needed (0 to 59)
- "<%nn%>", minute in two digits (00 to 59)
- "<%s%>", second in one or two digits, as needed (0 to 59)
- "<%ss%>", second in two digits (00 to 59)
- "<%AM/PM%>", twelve-hour clock with the uppercase letters "AM" or "PM", as appropriate
- "<%loc_AM/PM%>", indicates the time marker such as AM or PM using the current user regional and language settings
- "<%loc_A/P%>", indicates the one character time marker such as A or P using the current user regional and language settings
- "<%loc_time%>", indicates the time using the current user regional and language settings
- "<%loc_time24%>", indicates the time in 24 hours format without a time marker using the current user regional and language settings
- "<%loc_tsep%>", indicates the time separator using the current user regional and language settings (:)
- "<%loc_y%>", represents the Year only by the last digit, using current regional settings
- "<%loc_yy%>", represents the Year only by the last two digits, using current regional settings. A leading zero is added for single-digit years.
- "<%loc_yyyy%>", represents the Year by a full four or five digits, depending on the calendar used. Thai Buddhist and Korean calendars have five-digit years. The "yyyy" pattern shows five digits for these two calendars, and four digits for all other supported calendars. Calendars that have single-digit or two-digit years, such as for the Japanese Emperor era, are represented differently. A single-digit year is represented with a leading zero, for example, "03". A two-digit year is represented with two digits, for example, "13". No additional leading zeros are displayed
Also, dayWeekLabel property supports ex-HTML tags as follows:
- "<b>text</b>", displays the text in bold.
- "<li>text</li>", displays the text in italics.
- "<u>text</u>", underlines the text.
- "<s>text</s>", strike-through text
- "<a [id][;options]>text</a>", displays an anchor element that can be clicked
- "<font [family][;size]>text</font>", displays portions of text with a different font and/or different size.
- "<fgcolor color>text</fgcolor>", displays text with a specified foreground color.
- "<bgcolor color>text</bgcolor>", displays text with a specified background color.
- "<br>", defines a forced line-break
- "<r>", right aligns the text
- "<c>", centers the text
- "<img>key[:width]</img>", displays a custom-sized picture into the text. The key defines the name of the picture/image to be shown. The image can be added using the exontrol.HTMLPicture.Add() method.
- & glyph characters as "&" ( & ), "<" ( < ), ">" ( > ), "&qout;" ( quote character ) and "&#number;" ( the character with specified code ). For instance, "€" displays the EURO sign
- "<off offset>text</off>", defines the vertical offset to display the text.
- "<gra color[;mode[;blend]]>text</gra>", shows the text in gradient
- "<out color[;width]>text</out>", shows the text with outlined characters
- "<sha color[;width[;offset]]>text</sha>", shows the text with a shadow
-
Type
-
string
GetMonthLabel
GetMonthYearAlign() → {exontrol.DrawTextFormatEnum}
The GetMonthYearAlign() method defines the format the year's label is being displayed, while the control displays the month-view.
Returns:
Returns a exontrol.DrawTextFormatEnum value that defines the format the year's label is being displayed.
The exontrol.DrawTextFormatEnum type support the following flags:
- exTextAlignTop (0x00), justifies the text to the top of the rectangle
- exTextAlignLeft (0x00), aligns text to the left
- exTextAlignCenter (0x01), centers text horizontally in the rectangle
- exTextAlignRight (0x02), aligns text to the right
- exTextAlignVCenter (0x04), centers text vertically
- exTextAlignBottom (0x08), justifies the text to the bottom of the rectangle.
- exTextAlignMask (0x0F), specifies the mask for text's alignment.
- exTextWordBreak (0x10), breaks words. Lines are automatically broken between words if a word would extend past the edge of the rectangle specified by the lpRect parameter. A carriage return-line feed sequence also breaks the line. If this is not specified, output is on one line.
- exTextSingleLine (0x20), displays text on a single line only. Carriage returns and line feeds do not break the line.
- exTextExpandTabs (0x40), expands tab characters. The default number of characters per tab is eight.
- exPlainText (0x80), treats the text as plain text.
- exTextNoClip (0x0100), draws without clipping.
- exHTMLTextNoColors (0x0200), ignores the and tags.
- exTextCalcRect (0x0400), determines the width and height of the text.
- exHTMLTextNoTags (0x0800), ignores all HTML tags.
- exTextPathEllipsis (0x4000), for displayed text, replaces characters in the middle of the string with ellipses so that the result fits in the specified rectangle. If the string contains backslash (\) characters, exTextPathEllipsis preserves as much as possible of the text after the last backslash.
- exTextEndEllipsis (0x8000), for displayed text, if the end of a string does not fit in the rectangle, it is truncated and ellipses are added. If a word that is not at the end of the string goes beyond the limits of the rectangle, it is truncated without ellipses.
- exTextWordEllipsis (0x040000), truncates any word that does not fit in the rectangle and adds ellipses.
-
Type
-
exontrol.DrawTextFormatEnum
GetMonthYearAlign
GetOptions() → {object}
The GetOptions() method returns the current options of the control.
Returns:
An object of
Calendar.Options that indicates the options to display the control.
-
Type
-
object
GetOptions
GetPad() → {number|string|Array.<number>}
The GetPad() method specifies the padding to be applied on dates of the calendar.
Returns:
Returns the padding to be applied on dates of the calendar.
-
Type
-
number
|
string
|
Array.<number>
GetPad
GetPadCal() → {number|string|Array.<number>}
The GetPadCal() method specifies the padding to be applied on the calendar.
Returns:
Returns the padding to be applied on the calendar.
-
Type
-
number
|
string
|
Array.<number>
GetPadCal
GetReadOnly() → {boolean}
The GetReadOnly() method specifies whether the control is read-only (the user can't select new dates, but can browse for any date)
- Since:
Returns:
Returns true, if the control is read-only (the user can't select new dates, but can browse for any date)
-
Type
-
boolean
GetReadOnly
GetSelection() → {null|Date|array(Date)}
The GetSelection() method returns the control's selection as null, a Date type or an array of [Date].
Returns:
Returns null, a Date type or an array of [Date] type that specifies the list of dates being selected within the control
-
Type
-
null
|
Date
|
array(Date)
GetSelection
GetShapes() → {string}
The GetShapes() method defines the shapes each part of the control can display. The shapes field customizes the control's visual appearance.
Returns:
A string expression that defines the shapes each part of the control can display.
The format of shapes property is:
"shape(part),shape(part),..."
where:
- "shape", defines the shape to apply on the UI part as one of the following:
◦ any of 140 color names any browser supports (such as red, blue, green, ...)
◦ hexadecimal colors, is specified with: #RRGGBB, where the RR (red), GG (green) and BB (blue) hexadecimal integers specify the components of the color. All values must be between 00 and FF (such as #0000ff which defines a blue background)
◦ hexadecimal colors with transparency, is specified with: #RRGGBBAA, where AA (alpha) value must be between 00 and FF (such as #0000ff80 which defines a semi-transparent blue background)
◦ RGB colors, is specified with the RGB(red, green, blue) function. Each parameter (red, green, and blue) defines the intensity of the color and can be an integer between 0 and 255( such as rgb(0,0,255) that defines a blue background)
◦ RGBA colors, are an extension of RGB color values with an alpha channel as RGBA(red, green, blue, alpha) function, where the alpha parameter is a number between 0.0 (fully transparent) and 1.0 (fully opaque) ( such as rgba(0,0,255,0.5) which defines a semi-transparent blue background)
◦ HSL colors, is specified with the HSL(hue, saturation, lightness) function, where hue is a degree on the color wheel (from 0 to 360) - 0 (or 360) is red, 120 is green, 240 is blue. saturation is a percentage value; 0% means a shade of gray and 100% is the full color. lightness is also a percentage; 0% is black, 100% is white. HSL stands for hue, saturation, and lightness - and represents a cylindrical-coordinate representation of colors (such as hsl(240, 100%, 50%) that defines a blue background)
◦ HSLA colors, are an extension of HSL color values with an alpha channel - which specifies the opacity of the object as HSLA(hue, saturation, lightness, alpha) function, where alpha parameter is a number between 0.0 (fully transparent) and 1.0 (fully opaque) (such as hsla(240, 100%, 50%,0.5) that defines a semi-transparent blue background)
◦ a JSON representation of the shape object to apply (while it starts with { character, such as '{"normal": {"primitive": "RoundRect","fillColor":"black","tfi": {"fgColor": "white"}}}')
◦ specifies the name of the field within the exontrol.Shapes.Calendar object (while it starts with a lowercase letter, such as today which refers to exontrol.Shapes.Calendar.today shape)
◦ specifies the name of the field within the exontrol.Shapes object (while it starts with an uppercase letter, such as Button which refers to exontrol.Shapes.Button shape)
- "part", defines the name of the part the shape is applied on (as defined bellow)
The shapes property supports any of the following parts:
- "p" (prev), defines the prev button (available for any view)
- "n" (next), defines the next button (available for any view)
The following parts are available while the control displays the day-view:
- "da" (day-all), indicates all objects of the month.
- "dmh" (day-month-header) object that indicates the header that displays the month
- "dm" (days-month) specifies all days displayed in the current month ( it can include also non-month days as well )
- "d" (day), specifies a day of the current month
- "dnm" (day-non-month), specifies a day that is not part of the current month, but it is still displayed
- "dt" (today), specifies today in the current month
- "ds" (day-select), indicates a selected date
- "de" (week-end), specifies a day of weekend
- "dwa" (day-weeks-all) indicates the top-left corner object, when the week-header and week-number headers are visible
- "dwh" (day-week-header) indicates the header that shows the days of the week
- "dw" (day-week) specifies a day into the week-header
- "dwnh" (day-week-number-header) indicates the header that displays the week-numbers
- "dwn" (day-week-number) specifies the week-number
- "dwnn" (day-week-number-non-month) specifies the week-number that is not part of the current month
The following parts are available while the control displays the month-view:
- "ma" (month-all) specifies the area to display the entire year
- "mh" (month-header) indicates the header for month-view (it displays the year)
- "mm" (month-month) indicates the portion of the layout that displays the months of the year (excludes its header)
- "m" (month) specifies a single month within the month-view
- "mt" (month-today), indicates the current month (the month that contains today)
- "ms" (month-select), indicates a month that contains a selected date
The following parts are available while the control displays the year-view:
- "ya" (year-all) that specifies the area to display the entire layout
- "yh" (year-header) that indicates the header for year-view (it displays the range of years)
- "yy" (year-years) that indicates the portion of the layout that displays the years (excludes its header)
- "y" (year) that specifies a single year within the year-view
- "yt" (year-today), specifies the year of today
- "ys" (year-select), indicates a year that contains a selected date
-
Type
-
string
GetShapes
The GetSingleSel() method specifies whether the control supports single, multiple, toggle selection.
Returns:
Returns an OR combination of Calendar.SingleSelEnum flags that specifies how to select dates
The Calendar.SingleSelEnum type supports the following flags:
- exDisableSel(0), specifies that the control's selection is disabled (can not be combined with any other flags)
- exEnableSel(1), specifies that the control's selection is enabled (multiple-selection, unless the exSingleSel is set )
- exSingleSel(2), specifies that the user can select a date only
- exToggleSel(4), specifies that the date's selection state is toggled once the user clicks a date.
- exDisableCtrlSel(8), disables toggling the date's selection state when user clicks a date, while CTRL modifier key is pressed.
- exDisableShiftSel(16), disables selecting dates using the SHIFT key.
- exDisableDrag(32), disables selecting dates by drag.
-
Type
-
Calendar.SingleSelEnum
GetSingleSel
The GetSmoothScroll() method defines the time in ms the calendar's date scrolls to other value.
Returns:
Returns the time in ms the calendar's date scrolls to other value.
-
Type
-
number
GetSmoothScroll
GetSmoothSel() → {number}
The GetSmoothSel() method defines the time in ms the calendar's selection goes from one state to another.
Returns:
Returns the time in ms the calendar's selection goes from one state to another.
-
Type
-
number
GetSmoothSel
GetTfi() → {string|object}
The GetTfi() method gets the font attributes to apply on captions of the control.
Returns:
Returns the font attributes as a string representation such as "b monospace 16" or as an object such as {bold: true, fontName: "monospace", fontSize: 16}.
The result as a {string} can include any of the following keywords separated by space characters:
- bold, displays the text in bold (equivalent of <b> tag)
- italic, displays the text in italics (equivalent of <i> tag)
- underline, underlines the text (equivalent of <u> tag)
- strikeout, specifies whether the text is strike-through (equivalent of <s> tag)
- <fontName name>, specifies the font's family (equivalent of <font name> tag)
- <fontSize size>, specifies the size of the font (equivalent of <font ;size> tag)
- <fgColor CSSColor>, specifies the text's foreground color (equivalent of <fgcolor> tag)
- <bgColor CSSColor>, specifies the text's background color (equivalent of <bgcolor> tag)
- <shaColor CSSColor;width;offset>, defines the text's shadow (equivalent of <sha color;width;offset> tag)
- <outColor CSSColor>, shows the text with outlined characters (CSScolor) (equivalent of <out color> tag)
- <graColor CSSColor;mode;blend>, defines a gradient text (equivalent of <gra color;mode;blend> tag)
Any other word within the string result that's not recognized as a keyword is interpreted as:
- name of the font (not a number), specifies the font's family (equivalent of <font name> tag)
- size of the font (number), specifies the size of the font (equivalent of <font ;size> tag)
The result as {object} can include any of the following fields:
- bold {boolean}, displays the text in bold (equivalent of <b> tag)
- italic {boolean}, displays the text in italics (equivalent of <i> tag)
- underline {boolean}, underlines the text (equivalent of <u> tag)
- strikeout {boolean}, specifies whether the text is strike-through (equivalent of <s> tag)
- fontName {string}, specifies the font's family (equivalent of <font name> tag)
- fontSize {number}, specifies the size of the font (equivalent of <font ;size> tag)
- fgColor {string}, specifies the text's foreground color (CSScolor) (equivalent of <fgcolor> tag)
- bgColor {string}, specifies the text's background color (CSScolor) (equivalent of <bgcolor> tag)
- shaColor {object}, specifies an object of {color, width, offset} type that defines the text's shadow (equivalent of <sha color;width;offset> tag), where:
- color {string}, defines the color of the text's shadow (CSScolor)
- width {number}, defines the size of the text's shadow
- offset {number}, defines the offset to show the text's shadow relative to the text
- outColor {string}, shows the text with outlined characters (CSScolor) (equivalent of <out color> tag)
- graColor {object}, specifies an object of {color, mode, blend} type that defines a gradient text (equivalent of <gra color;mode;blend> tag), where:
- color {string}, defines the gradient-color (CSScolor)
- mode {number}, defines the gradient mode as a value between 0 and 4
- blend {number}, defines the gradient blend as a value between 0 and 1
CSSColor or CSS legal color values can be specified by the following methods:
- Hexadecimal colors, is specified with: #RRGGBB, where the RR (red), GG (green) and BB (blue) hexadecimal integers specify the components of the color. All values must be between 00 and FF. For example, #0000ff value is rendered as blue, because the blue component is set to its highest value (ff) and the others are set to 00.
- Hexadecimal colors with transparency, is specified with: #RRGGBBAA, where AA (alpha) value must be between 00 and FF. For example, #0000ff80 defines a semi-transparent blue.
- RGB colors, is specified with the RGB(red, green, blue) function. Each parameter (red, green, and blue) defines the intensity of the color and can be an integer between 0 and 255. For example, rgb(0,0,255) defines the blue color.
- RGBA colors, are an extension of RGB color values with an alpha channel as RGBA(red, green, blue, alpha) function, where the alpha parameter is a number between 0.0 (fully transparent) and 1.0 (fully opaque). For example, rgba(0,0,255,0.5) defines a semi-transparent blue.
- HSL colors, is specified with the HSL(hue, saturation, lightness) function, where hue is a degree on the color wheel (from 0 to 360) - 0 (or 360) is red, 120 is green, 240 is blue. saturation is a percentage value; 0% means a shade of gray and 100% is the full color. lightness is also a percentage; 0% is black, 100% is white. HSL stands for hue, saturation, and lightness - and represents a cylindrical-coordinate representation of colors. For example, hsl(240, 100%, 50%) defines the blue color.
- HSLA colors, are an extension of HSL color values with an alpha channel - which specifies the opacity of the object as HSLA(hue, saturation, lightness, alpha) function, where alpha parameter is a number between 0.0 (fully transparent) and 1.0 (fully opaque). For example, hsla(240, 100%, 50%,0.5) defines a semi-transparent blue.
- Predefined/Cross-browser color names, 140 color names are predefined in the HTML and CSS color specification. For example, blue defines the blue color.
-
Type
-
string
|
object
GetTfi
The GetToolTipDelay() method specifies how long the mouse pointer must point to an object before the tool tip appears
- Since:
Returns:
Returns how long the mouse pointer must point to an object before the tool tip appears
-
Type
-
number
GetToolTipDelay
The GetToolTipPopDelay() method specifies the period in ms of time the tool top remains visible if the mouse pointer is stationary within a control
- Since:
Returns:
Returns the period in ms of time the tool top remains visible if the mouse pointer is stationary within a control
-
Type
-
number
GetToolTipPopDelay
The GetToolTipWidth() method specifies the width of the tooltip window, in pixels
Returns:
Returns the width of the tooltip window, in pixels
-
Type
-
number
GetToolTipWidth
GetViewRect() → {Array.<number>}
The GetViewRect() method returns the position of the owner canvas element within the document.
- Since:
Returns:
Returns an array of [x,y,width,height] that specifies the position canvas element within the document.
-
Type
-
Array.<number>
GetViewRect
GetWheelChange() → {number}
The GetWheelChange() method defines the amount the calendar scrolls when the user rolls the mouse wheel.
Returns:
Returns the amount the calendar scrolls when the user rolls the mouse wheel.
-
Type
-
number
GetWheelChange
GetYearAlign() → {exontrol.DrawTextFormatEnum}
The GetYearAlign() method defines the format the year's label is being displayed, while the control displays the year-view.
Returns:
Returns a exontrol.DrawTextFormatEnum value that defines the format the year's label is being displayed.
The exontrol.DrawTextFormatEnum type support the following flags:
- exTextAlignTop (0x00), justifies the text to the top of the rectangle
- exTextAlignLeft (0x00), aligns text to the left
- exTextAlignCenter (0x01), centers text horizontally in the rectangle
- exTextAlignRight (0x02), aligns text to the right
- exTextAlignVCenter (0x04), centers text vertically
- exTextAlignBottom (0x08), justifies the text to the bottom of the rectangle.
- exTextAlignMask (0x0F), specifies the mask for text's alignment.
- exTextWordBreak (0x10), breaks words. Lines are automatically broken between words if a word would extend past the edge of the rectangle specified by the lpRect parameter. A carriage return-line feed sequence also breaks the line. If this is not specified, output is on one line.
- exTextSingleLine (0x20), displays text on a single line only. Carriage returns and line feeds do not break the line.
- exTextExpandTabs (0x40), expands tab characters. The default number of characters per tab is eight.
- exPlainText (0x80), treats the text as plain text.
- exTextNoClip (0x0100), draws without clipping.
- exHTMLTextNoColors (0x0200), ignores the and tags.
- exTextCalcRect (0x0400), determines the width and height of the text.
- exHTMLTextNoTags (0x0800), ignores all HTML tags.
- exTextPathEllipsis (0x4000), for displayed text, replaces characters in the middle of the string with ellipses so that the result fits in the specified rectangle. If the string contains backslash (\) characters, exTextPathEllipsis preserves as much as possible of the text after the last backslash.
- exTextEndEllipsis (0x8000), for displayed text, if the end of a string does not fit in the rectangle, it is truncated and ellipses are added. If a word that is not at the end of the string goes beyond the limits of the rectangle, it is truncated without ellipses.
- exTextWordEllipsis (0x040000), truncates any word that does not fit in the rectangle and adds ellipses.
-
Type
-
exontrol.DrawTextFormatEnum
GetYearAlign
GetYearLabel() → {string}
The GetYearLabel() method indicates a HTML string that can include expression fields (<%...%>) to display the year while the control displays the month-view or year-view.
Returns:
Returns a string that specifies a HTML string that can include expression fields (<%...%>) to display the year while the control displays the month-view or year-view.
The yearLabel property can include any of the following fields:
- "<%d%>", day of the month in one or two numeric digits, as needed (1 to 31)
- "<%dd%>", day of the month in two numeric digits (01 to 31)
- "<%d1%>", first letter of the weekday (S to S)"
- "<%loc_d1%>", indicates day of week as a one-letter abbreviation using the current user settings
- "<%d2%>", first two letters of the weekday (Su to Sa)
- "<%loc_d2%>", indicates day of week as a two-letters abbreviation using the current user settings
- "<%d3%>", first three letters of the weekday (Sun to Sat)
- "<%loc_d3%>", equivalent with "<%loc_ddd%>"
- "<%ddd%>", first three letters of the weekday (Sun to Sat)
- "<%loc_ddd%>", indicates the day of week as a three-letter abbreviation using the current user regional and language settings
- "<%dddd%>", full name of the weekday (Sunday to Saturday)
- "<%loc_dddd%>", indicates day of week as its full name using the current user regional and language settings
- "<%i%>", displays the number instead the date
- "<%w%>", day of the week (1 to 7)
- "<%ww%>", week of the year (1 to 53)
- "<%m%>", month of the year in one or two numeric digits, as needed (1 to 12)
- "<%mr%>", month of the year in Roman numerals, as needed (I to XII)
- "<%mm%>", month of the year in two numeric digits (01 to 12)
- "<%m1%>", first letter of the month (J to D)
- "<%loc_m1%>", indicates month as a one-letter abbreviation using the current user settings
- "<%m2%>", first two letters of the month (Ja to De)
- "<%loc_m2%>", indicates month as a two-letters abbreviation using the current user settings
- "<%m3%>", first three letters of the month (Jan to Dec)
- "<%loc_m3%>", equivalent with "<%loc_mmm%>"
- "<%mmm%>", first three letters of the month (Jan to Dec)
- "<%loc_mmm%>", indicates month as a three-letter abbreviation using the current user regional and language settings
- "<%mmmm%>", full name of the month (January to December)
- "<%loc_mmmm%>", indicates month as its full name using the current user regional and language settings
- "<%q%>", Date displayed as the quarter of the year (1 to 4)
- "<%y%>", number of the day of the year (1 to 366)
- "<%yy%>", last two digits of the year (01 to 99)
- "<%yyyy%>", full year (0100 to 9999)
- "<%hy%>", date displayed as the half of the year (1 to 2)
- "<%loc_g%>", indicates period/era using the current user regional and language settings
- "<%loc_gg%>", indicates period/era using the current user regional and language settings
- "<%loc_sdate%>", indicates the date in the short format using the current user regional and language settings
- "<%loc_ldate%>", indicates the date in the long format using the current user regional and language settings
- "<%loc_dsep%>", indicates the date separator using the current user regional and language settings (/)
- "<%h%>", hour in one or two digits, as needed (0 to 23)
- "<%hh%>", hour in two digits (00 to 23)
- "<%h12%>", hour in 12-hour time format, in one or two digits - [0(12),11]
- "<%hh12%>", hour in 12-hour time format, in two digits - [00(12),11]
- "<%n%>", minute in one or two digits, as needed (0 to 59)
- "<%nn%>", minute in two digits (00 to 59)
- "<%s%>", second in one or two digits, as needed (0 to 59)
- "<%ss%>", second in two digits (00 to 59)
- "<%AM/PM%>", twelve-hour clock with the uppercase letters "AM" or "PM", as appropriate
- "<%loc_AM/PM%>", indicates the time marker such as AM or PM using the current user regional and language settings
- "<%loc_A/P%>", indicates the one character time marker such as A or P using the current user regional and language settings
- "<%loc_time%>", indicates the time using the current user regional and language settings
- "<%loc_time24%>", indicates the time in 24 hours format without a time marker using the current user regional and language settings
- "<%loc_tsep%>", indicates the time separator using the current user regional and language settings (:)
- "<%loc_y%>", represents the Year only by the last digit, using current regional settings
- "<%loc_yy%>", represents the Year only by the last two digits, using current regional settings. A leading zero is added for single-digit years.
- "<%loc_yyyy%>", represents the Year by a full four or five digits, depending on the calendar used. Thai Buddhist and Korean calendars have five-digit years. The "yyyy" pattern shows five digits for these two calendars, and four digits for all other supported calendars. Calendars that have single-digit or two-digit years, such as for the Japanese Emperor era, are represented differently. A single-digit year is represented with a leading zero, for example, "03". A two-digit year is represented with two digits, for example, "13". No additional leading zeros are displayed
Also, dayWeekLabel property supports ex-HTML tags as follows:
- "<b>text</b>", displays the text in bold.
- "<li>text</li>", displays the text in italics.
- "<u>text</u>", underlines the text.
- "<s>text</s>", strike-through text
- "<a [id][;options]>text</a>", displays an anchor element that can be clicked
- "<font [family][;size]>text</font>", displays portions of text with a different font and/or different size.
- "<fgcolor color>text</fgcolor>", displays text with a specified foreground color.
- "<bgcolor color>text</bgcolor>", displays text with a specified background color.
- "<br>", defines a forced line-break
- "<r>", right aligns the text
- "<c>", centers the text
- "<img>key[:width]</img>", displays a custom-sized picture into the text. The key defines the name of the picture/image to be shown. The image can be added using the exontrol.HTMLPicture.Add() method.
- & glyph characters as "&" ( & ), "<" ( < ), ">" ( > ), "&qout;" ( quote character ) and "&#number;" ( the character with specified code ). For instance, "€" displays the EURO sign
- "<off offset>text</off>", defines the vertical offset to display the text.
- "<gra color[;mode[;blend]]>text</gra>", shows the text in gradient
- "<out color[;width]>text</out>", shows the text with outlined characters
- "<sha color[;width[;offset]]>text</sha>", shows the text with a shadow
-
Type
-
string
GetYearLabel
GetYearRangeAlign() → {exontrol.DrawTextFormatEnum}
The GetYearRangeAlign() method defines the format the label that shows the range of years is being displayed, while the control displays the month-view.
Returns:
Returns a exontrol.DrawTextFormatEnum value that defines the format the label that shows the range of years is being displayed.
The exontrol.DrawTextFormatEnum type support the following flags:
- exTextAlignTop (0x00), justifies the text to the top of the rectangle
- exTextAlignLeft (0x00), aligns text to the left
- exTextAlignCenter (0x01), centers text horizontally in the rectangle
- exTextAlignRight (0x02), aligns text to the right
- exTextAlignVCenter (0x04), centers text vertically
- exTextAlignBottom (0x08), justifies the text to the bottom of the rectangle.
- exTextAlignMask (0x0F), specifies the mask for text's alignment.
- exTextWordBreak (0x10), breaks words. Lines are automatically broken between words if a word would extend past the edge of the rectangle specified by the lpRect parameter. A carriage return-line feed sequence also breaks the line. If this is not specified, output is on one line.
- exTextSingleLine (0x20), displays text on a single line only. Carriage returns and line feeds do not break the line.
- exTextExpandTabs (0x40), expands tab characters. The default number of characters per tab is eight.
- exPlainText (0x80), treats the text as plain text.
- exTextNoClip (0x0100), draws without clipping.
- exHTMLTextNoColors (0x0200), ignores the and tags.
- exTextCalcRect (0x0400), determines the width and height of the text.
- exHTMLTextNoTags (0x0800), ignores all HTML tags.
- exTextPathEllipsis (0x4000), for displayed text, replaces characters in the middle of the string with ellipses so that the result fits in the specified rectangle. If the string contains backslash (\) characters, exTextPathEllipsis preserves as much as possible of the text after the last backslash.
- exTextEndEllipsis (0x8000), for displayed text, if the end of a string does not fit in the rectangle, it is truncated and ellipses are added. If a word that is not at the end of the string goes beyond the limits of the rectangle, it is truncated without ellipses.
- exTextWordEllipsis (0x040000), truncates any word that does not fit in the rectangle and adds ellipses.
-
Type
-
exontrol.DrawTextFormatEnum
GetYearRangeAlign
Next(step)
The Next() method advances the calendar's date with one or more month(s)/year(s)
Parameters:
Name |
Type |
Description |
step |
number
|
Specifies the number of month(s)/year(s) to advance. The number can be negative which specifies the number of month(s)/year(s) to move backward by. |
Next
Prev(step)
The Prev() method moves backward the calendar's date by one or more month(s)/year(s)
Parameters:
Name |
Type |
Description |
step |
number
|
Specifies the number of month(s)/year(s) to move backward |
Prev
Refresh()
The Refresh() method refreshes the control.
- Since:
Refresh
SetAlignCal(value)
The SetAlignCal() method aligns the calendar relative to the canvas.
Parameters:
Name |
Type |
Description |
value |
exontrol.AlignEnum
|
A exontrol.AlignEnum value that aligns the calendar, while the control shows days.
The exontrol.AlignEnum type supports the following values:
- exAlignTop (0x00), justifies the object to the top of the rectangle
- exAlignLeft (0x00), aligns object to the left
- exAlignCenter (0x01), centers object horizontally in the rectangle
- exAlignRight (0x02), aligns object to the right
- exAlignVCenter (0x04), centers object vertically
- exAlignBottom (0x08), justifies the object to the bottom of the rectangle
|
Example
0 or exontrol.AlignEnum.exAlignTop | exontrol.AlignEnum.exAlignLeft {number}, aligns the calendar to the top-left corner
5 or exontrol.AlignEnum.exAlignCenter | exontrol.AlignEnum.exAlignVCenter {number}, centers the calendar
SetAlignCal
The SetAllowScrollByDrag() method enables or disables scrolling the control by drag.
Parameters:
Name |
Type |
Description |
value |
boolean
|
A boolean value that indicates whether the user can scroll the control by drag |
Example
false {boolean}, disables scrolling the control by drag
true {boolean}, the user can scrolls the control by drag (click a month area where no dates is displayed and drag in any direction to get control scrolled)
SetAllowScrollByDrag
SetAllowSwitchView(value)
The SetAllowSwitchView() method locks switching the views (month or year).
Parameters:
Name |
Type |
Description |
value |
boolean
|
A boolean value that indicates whether the user can switch the view (month or year) |
Example
false {boolean}, disables month or year view
true {boolean}, enables month or year view
SetAllowSwitchView
SetAutoSize(value)
The SetAutoSize() method specifies whether the size of the calendar's date to be relative to the font, client or fixed.
Parameters:
Name |
Type |
Description |
value |
Calendar.AutoSizeEnum
|
A Calendar.AutoSizeEnum value that determines whether the size of the calendar's date is fixed, or relative to the current font or client area.
The Calendar.AutoSizeEnum type defines the following values:
- exFontSize(-1), indicates that the size of the calendar's date is automatically computed based on the current font
- exFixedSize(0), specifies that the size of the calendar's date is fixed. The dayFixedWidth / dayFixedHeight specifies the size of the calendar's date while autoSize property is Calendar.AutoSizeEnum.exFixedSize
- exFitClient(1), indicates that the size of the calendar's date is computed so entire calendar fits the control's client area
|
Example
-1 or Calendar.AutoSizeEnum.exFontSize {number}, defines the size of the calendar's date based on the current font.
1 or Calendar.AutoSizeEnum.exFitClient {number}, resizes the calendar's date to ensure all months fit the control's client area
SetAutoSize
SetCursors(value)
The SetCursors() method changes the mouse cursor to be displayed when pointing over different parts of the control.
Parameters:
Name |
Type |
Description |
value |
string
|
A string expression that defines the mouse cursor to be displayed when pointing over different parts of the control.
The format of cursors property is:
"cursor(part),cursor(part),..."
where:
- "cursor", defines the CSS mouse cursor to display while cursor hovers the part
- "part", defines the name of the part the cursor is applied on (as defined bellow)
The "part" can be any of the following:
- "p" (prev), defines the prev button (available for any view)
- "n" (next), defines the next button (available for any view)
- "anchor" (hyperlink), defines the mouse-cursor when the mouse pointer hovers the anchor (the <a> ex-HTML part marks an anchor or hyperlink element) (@since 2.2)
The following parts are available while the control displays the day-view:
- "da" (day-all), indicates all objects of the month.
- "dmh" (day-month-header) object that indicates the header that displays the month
- "dm" (days-month) specifies all days displayed in the current month ( it can include also non-month days as well )
- "d" (day), specifies a day of the current month
- "dnm" (day-non-month), specifies a day that is not part of the current month, but it is still displayed
- "dt" (today), specifies today in the current month
- "ds" (day-select), indicates a selected date
- "de" (week-end), specifies a day of weekend
- "dwa" (day-weeks-all) indicates the top-left corner object, when the week-header and week-number headers are visible
- "dwh" (day-week-header) indicates the header that shows the days of the week
- "dw" (day-week) specifies a day into the week-header
- "dwnh" (day-week-number-header) indicates the header that displays the week-numbers
- "dwn" (day-week-number) specifies the week-number
- "dwnn" (day-week-number-non-month) specifies the week-number that is not part of the current month
The following parts are available while the control displays the month-view:
- "ma" (month-all) specifies the area to display the entire year
- "mh" (month-header) indicates the header for month-view (it displays the year)
- "mm" (month-month) indicates the portion of the layout that displays the months of the year (excludes its header)
- "m" (month) specifies a single month within the month-view
- "mt" (month-today), indicates the current month (the month that contains today)
- "ms" (month-select), indicates a month that contains a selected date
The following parts are available while the control displays the year-view:
- "ya" (year-all) that specifies the area to display the entire layout
- "yh" (year-header) that indicates the header for year-view (it displays the range of years)
- "yy" (year-years) that indicates the portion of the layout that displays the years (excludes its header)
- "y" (year) that specifies a single year within the year-view
- "yt" (year-today), specifies the year of today
- "ys" (year-select), indicates a year that contains a selected date
|
Example
"" {string}, no mouse cursor support
"pointer(d,p,n)" {string}, indicates that the "pointer" mouse cursor is shown once the cursor hovers the "d", "p" or "n" parts of the control
SetCursors
SetDate(year, month, day) → {boolean}
The SetDate() method changes the calendar's date to specified date
Parameters:
Name |
Type |
Description |
year |
null
|
number
|
string
|
date
|
A value of one of the following types:
- Integer value representing the year of the date to be created
- String expression in format "#MM/DD/YYYY#" or ISO 8601 string representation such as "2011-10-10" (date-only form) (since 1.3)
- Date type, indicates the date to be copied
- missing/null/undefined, indicates the current date and time (equivalent of Now)
|
month |
number
|
Integer value representing the month, beginning with 1 for January to 12 for December. If missing/null/undefined, 1 (January) is used instead |
day |
number
|
Integer value representing the day of the month, beginning with 1 for the first day of the month, 2 for the second day, .... If missing/null/undefined, 1-st is used instead |
Returns:
Returns true, if the calendar's date has been changed
-
Type
-
boolean
Example
null {null}, browses today date
"#12/31/1971#" {string}, browses December 31, 1971
SetDate
SetDayAlign(value)
The SetDayAlign() method aligns the date's label, while the control shows days (day-view).
Parameters:
Name |
Type |
Description |
value |
exontrol.DrawTextFormatEnum
|
A exontrol.DrawTextFormatEnum value that aligns the date's label, while the control shows days (day-view).
The exontrol.DrawTextFormatEnum type support the following flags:
- exTextAlignTop (0x00), justifies the text to the top of the rectangle
- exTextAlignLeft (0x00), aligns text to the left
- exTextAlignCenter (0x01), centers text horizontally in the rectangle
- exTextAlignRight (0x02), aligns text to the right
- exTextAlignVCenter (0x04), centers text vertically
- exTextAlignBottom (0x08), justifies the text to the bottom of the rectangle.
- exTextAlignMask (0x0F), specifies the mask for text's alignment.
- exTextWordBreak (0x10), breaks words. Lines are automatically broken between words if a word would extend past the edge of the rectangle specified by the lpRect parameter. A carriage return-line feed sequence also breaks the line. If this is not specified, output is on one line.
- exTextSingleLine (0x20), displays text on a single line only. Carriage returns and line feeds do not break the line.
- exTextExpandTabs (0x40), expands tab characters. The default number of characters per tab is eight.
- exPlainText (0x80), treats the text as plain text.
- exTextNoClip (0x0100), draws without clipping.
- exHTMLTextNoColors (0x0200), ignores the and tags.
- exTextCalcRect (0x0400), determines the width and height of the text.
- exHTMLTextNoTags (0x0800), ignores all HTML tags.
- exTextPathEllipsis (0x4000), for displayed text, replaces characters in the middle of the string with ellipses so that the result fits in the specified rectangle. If the string contains backslash (\) characters, exTextPathEllipsis preserves as much as possible of the text after the last backslash.
- exTextEndEllipsis (0x8000), for displayed text, if the end of a string does not fit in the rectangle, it is truncated and ellipses are added. If a word that is not at the end of the string goes beyond the limits of the rectangle, it is truncated without ellipses.
- exTextWordEllipsis (0x040000), truncates any word that does not fit in the rectangle and adds ellipses.
|
Example
null {null}, centers the label
32 or exontrol.DrawTextFormatEnum.exTextSingleLine {number}, defines a single-line label
0x2A or exontrol.DrawTextFormatEnum.exTextSingleLine | exontrol.DrawTextFormatEnum.exTextAlignRight | exontrol.DrawTextFormatEnum.exTextAlignBottom {number}, defines a single-line label right/bottom-aligned
SetDayAlign
SetDayFixedHeight(value)
The SetDayFixedHeight() method changes the height of the calendar's date when autoSize is Calendar.AutoSizeEnum.exFixedSize.
Parameters:
Name |
Type |
Description |
value |
number
|
A number value that defines the height of the calendar's date when autoSize is Calendar.AutoSizeEnum.exFixedSize. |
Example
24 {number}, defines the date's height to 24-pixels
SetDayFixedHeight
SetDayFixedWidth(value)
The SetDayFixedWidth() method changes the width of the calendar's date when autoSize is Calendar.AutoSizeEnum.exFixedSize.
Parameters:
Name |
Type |
Description |
value |
number
|
A number value that defines the width of the calendar's date when autoSize is Calendar.AutoSizeEnum.exFixedSize. |
Example
24 {number}, defines the date's width to 24-pixels
SetDayFixedWidth
SetDayLabel(value)
The SetDayLabel() method changes the ex-HTML string that can include expression fields (<%...%>) to display the date while the control shows days (day-view).
Parameters:
Name |
Type |
Description |
value |
string
|
A string value that indicates a HTML string that can include expression fields (<%...%>) to display the date while the control shows days (day-view).
The dayLabel property can include any of the following fields:
- "<%d%>", day of the month in one or two numeric digits, as needed (1 to 31)
- "<%dd%>", day of the month in two numeric digits (01 to 31)
- "<%d1%>", first letter of the weekday (S to S)"
- "<%loc_d1%>", indicates day of week as a one-letter abbreviation using the current user settings
- "<%d2%>", first two letters of the weekday (Su to Sa)
- "<%loc_d2%>", indicates day of week as a two-letters abbreviation using the current user settings
- "<%d3%>", first three letters of the weekday (Sun to Sat)
- "<%loc_d3%>", equivalent with "<%loc_ddd%>"
- "<%ddd%>", first three letters of the weekday (Sun to Sat)
- "<%loc_ddd%>", indicates the day of week as a three-letter abbreviation using the current user regional and language settings
- "<%dddd%>", full name of the weekday (Sunday to Saturday)
- "<%loc_dddd%>", indicates day of week as its full name using the current user regional and language settings
- "<%i%>", displays the number instead the date
- "<%w%>", day of the week (1 to 7)
- "<%ww%>", week of the year (1 to 53)
- "<%m%>", month of the year in one or two numeric digits, as needed (1 to 12)
- "<%mr%>", month of the year in Roman numerals, as needed (I to XII)
- "<%mm%>", month of the year in two numeric digits (01 to 12)
- "<%m1%>", first letter of the month (J to D)
- "<%loc_m1%>", indicates month as a one-letter abbreviation using the current user settings
- "<%m2%>", first two letters of the month (Ja to De)
- "<%loc_m2%>", indicates month as a two-letters abbreviation using the current user settings
- "<%m3%>", first three letters of the month (Jan to Dec)
- "<%loc_m3%>", equivalent with "<%loc_mmm%>"
- "<%mmm%>", first three letters of the month (Jan to Dec)
- "<%loc_mmm%>", indicates month as a three-letter abbreviation using the current user regional and language settings
- "<%mmmm%>", full name of the month (January to December)
- "<%loc_mmmm%>", indicates month as its full name using the current user regional and language settings
- "<%q%>", Date displayed as the quarter of the year (1 to 4)
- "<%y%>", number of the day of the year (1 to 366)
- "<%yy%>", last two digits of the year (01 to 99)
- "<%yyyy%>", full year (0100 to 9999)
- "<%hy%>", date displayed as the half of the year (1 to 2)
- "<%loc_g%>", indicates period/era using the current user regional and language settings
- "<%loc_gg%>", indicates period/era using the current user regional and language settings
- "<%loc_sdate%>", indicates the date in the short format using the current user regional and language settings
- "<%loc_ldate%>", indicates the date in the long format using the current user regional and language settings
- "<%loc_dsep%>", indicates the date separator using the current user regional and language settings (/)
- "<%h%>", hour in one or two digits, as needed (0 to 23)
- "<%hh%>", hour in two digits (00 to 23)
- "<%h12%>", hour in 12-hour time format, in one or two digits - [0(12),11]
- "<%hh12%>", hour in 12-hour time format, in two digits - [00(12),11]
- "<%n%>", minute in one or two digits, as needed (0 to 59)
- "<%nn%>", minute in two digits (00 to 59)
- "<%s%>", second in one or two digits, as needed (0 to 59)
- "<%ss%>", second in two digits (00 to 59)
- "<%AM/PM%>", twelve-hour clock with the uppercase letters "AM" or "PM", as appropriate
- "<%loc_AM/PM%>", indicates the time marker such as AM or PM using the current user regional and language settings
- "<%loc_A/P%>", indicates the one character time marker such as A or P using the current user regional and language settings
- "<%loc_time%>", indicates the time using the current user regional and language settings
- "<%loc_time24%>", indicates the time in 24 hours format without a time marker using the current user regional and language settings
- "<%loc_tsep%>", indicates the time separator using the current user regional and language settings (:)
- "<%loc_y%>", represents the Year only by the last digit, using current regional settings
- "<%loc_yy%>", represents the Year only by the last two digits, using current regional settings. A leading zero is added for single-digit years.
- "<%loc_yyyy%>", represents the Year by a full four or five digits, depending on the calendar used. Thai Buddhist and Korean calendars have five-digit years. The "yyyy" pattern shows five digits for these two calendars, and four digits for all other supported calendars. Calendars that have single-digit or two-digit years, such as for the Japanese Emperor era, are represented differently. A single-digit year is represented with a leading zero, for example, "03". A two-digit year is represented with two digits, for example, "13". No additional leading zeros are displayed
Also, dayLabel property supports ex-HTML tags as follows:
- "<b>text</b>", displays the text in bold.
- "<li>text</li>", displays the text in italics.
- "<u>text</u>", underlines the text.
- "<s>text</s>", strike-through text
- "<a [id][;options]>text</a>", displays an anchor element that can be clicked
- "<font [family][;size]>text</font>", displays portions of text with a different font and/or different size.
- "<fgcolor color>text</fgcolor>", displays text with a specified foreground color.
- "<bgcolor color>text</bgcolor>", displays text with a specified background color.
- "<br>", defines a forced line-break
- "<r>", right aligns the text
- "<c>", centers the text
- "<img>key[:width]</img>", displays a custom-sized picture into the text. The key defines the name of the picture/image to be shown. The image can be added using the exontrol.HTMLPicture.Add() method.
- & glyph characters as "&" ( & ), "<" ( < ), ">" ( > ), "&qout;" ( quote character ) and "&#number;" ( the character with specified code ). For instance, "€" displays the EURO sign
- "<off offset>text</off>", defines the vertical offset to display the text.
- "<gra color[;mode[;blend]]>text</gra>", shows the text in gradient
- "<out color[;width]>text</out>", shows the text with outlined characters
- "<sha color[;width[;offset]]>text</sha>", shows the text with a shadow
|
Example
"<%d%>" {string}, displays the day of the month in one or two numeric digits, as needed (1 to 31),
"<%dd%>" {string}, displays day of the month in two numeric digits (01 to 31)
"<%d%>\n<font ;8><fgcolor gray><%y%></fgcolor>" {string}, displays the day of the month in one or two numeric digits, as needed (1 to 31) on the first line, and on the second line displays the number of the day of the year (1 to 366) in gray
SetDayLabel
SetDayMonthAlign(value)
The SetDayMonthAlign() method aligns the month's label, while the control shows days (day-view).
Parameters:
Name |
Type |
Description |
value |
exontrol.DrawTextFormatEnum
|
A exontrol.DrawTextFormatEnum value that aligns the month's label, while the control shows days (day-view).
The exontrol.DrawTextFormatEnum type support the following flags:
- exTextAlignTop (0x00), justifies the text to the top of the rectangle
- exTextAlignLeft (0x00), aligns text to the left
- exTextAlignCenter (0x01), centers text horizontally in the rectangle
- exTextAlignRight (0x02), aligns text to the right
- exTextAlignVCenter (0x04), centers text vertically
- exTextAlignBottom (0x08), justifies the text to the bottom of the rectangle.
- exTextAlignMask (0x0F), specifies the mask for text's alignment.
- exTextWordBreak (0x10), breaks words. Lines are automatically broken between words if a word would extend past the edge of the rectangle specified by the lpRect parameter. A carriage return-line feed sequence also breaks the line. If this is not specified, output is on one line.
- exTextSingleLine (0x20), displays text on a single line only. Carriage returns and line feeds do not break the line.
- exTextExpandTabs (0x40), expands tab characters. The default number of characters per tab is eight.
- exPlainText (0x80), treats the text as plain text.
- exTextNoClip (0x0100), draws without clipping.
- exHTMLTextNoColors (0x0200), ignores the and tags.
- exTextCalcRect (0x0400), determines the width and height of the text.
- exHTMLTextNoTags (0x0800), ignores all HTML tags.
- exTextPathEllipsis (0x4000), for displayed text, replaces characters in the middle of the string with ellipses so that the result fits in the specified rectangle. If the string contains backslash (\) characters, exTextPathEllipsis preserves as much as possible of the text after the last backslash.
- exTextEndEllipsis (0x8000), for displayed text, if the end of a string does not fit in the rectangle, it is truncated and ellipses are added. If a word that is not at the end of the string goes beyond the limits of the rectangle, it is truncated without ellipses.
- exTextWordEllipsis (0x040000), truncates any word that does not fit in the rectangle and adds ellipses.
|
Example
null {null}, centers the label
32 or exontrol.DrawTextFormatEnum.exTextSingleLine {number}, defines a single-line label
0x2A or exontrol.DrawTextFormatEnum.exTextSingleLine | exontrol.DrawTextFormatEnum.exTextAlignRight | exontrol.DrawTextFormatEnum.exTextAlignBottom {number}, defines a single-line label right/bottom-aligned
SetDayMonthAlign
The SetDayMonthHeader() method shows or hides the header to display the month-name (day-view only).
Parameters:
Name |
Type |
Description |
value |
boolean
|
A boolean value that indicates whether the header to display the month-name is visible or hidden. |
Example
false {boolean}, hides the calendar's header (month's name)
true {boolean}, shows the calendar's header (month's name)
SetDayMonthHeader
SetDayMonthLabel(value)
The SetDayMonthLabel() method changes the ex-HTML label to show the month-name into the calendar's header (day-view only).
Parameters:
Name |
Type |
Description |
value |
string
|
A string value that defines the ex-HTML label to show the month-name into the calendar's header
The dayMonthLabel property can include any of the following fields:
- "<%d%>", day of the month in one or two numeric digits, as needed (1 to 31)
- "<%dd%>", day of the month in two numeric digits (01 to 31)
- "<%d1%>", first letter of the weekday (S to S)"
- "<%loc_d1%>", indicates day of week as a one-letter abbreviation using the current user settings
- "<%d2%>", first two letters of the weekday (Su to Sa)
- "<%loc_d2%>", indicates day of week as a two-letters abbreviation using the current user settings
- "<%d3%>", first three letters of the weekday (Sun to Sat)
- "<%loc_d3%>", equivalent with "<%loc_ddd%>"
- "<%ddd%>", first three letters of the weekday (Sun to Sat)
- "<%loc_ddd%>", indicates the day of week as a three-letter abbreviation using the current user regional and language settings
- "<%dddd%>", full name of the weekday (Sunday to Saturday)
- "<%loc_dddd%>", indicates day of week as its full name using the current user regional and language settings
- "<%i%>", displays the number instead the date
- "<%w%>", day of the week (1 to 7)
- "<%ww%>", week of the year (1 to 53)
- "<%m%>", month of the year in one or two numeric digits, as needed (1 to 12)
- "<%mr%>", month of the year in Roman numerals, as needed (I to XII)
- "<%mm%>", month of the year in two numeric digits (01 to 12)
- "<%m1%>", first letter of the month (J to D)
- "<%loc_m1%>", indicates month as a one-letter abbreviation using the current user settings
- "<%m2%>", first two letters of the month (Ja to De)
- "<%loc_m2%>", indicates month as a two-letters abbreviation using the current user settings
- "<%m3%>", first three letters of the month (Jan to Dec)
- "<%loc_m3%>", equivalent with "<%loc_mmm%>"
- "<%mmm%>", first three letters of the month (Jan to Dec)
- "<%loc_mmm%>", indicates month as a three-letter abbreviation using the current user regional and language settings
- "<%mmmm%>", full name of the month (January to December)
- "<%loc_mmmm%>", indicates month as its full name using the current user regional and language settings
- "<%q%>", Date displayed as the quarter of the year (1 to 4)
- "<%y%>", number of the day of the year (1 to 366)
- "<%yy%>", last two digits of the year (01 to 99)
- "<%yyyy%>", full year (0100 to 9999)
- "<%hy%>", date displayed as the half of the year (1 to 2)
- "<%loc_g%>", indicates period/era using the current user regional and language settings
- "<%loc_gg%>", indicates period/era using the current user regional and language settings
- "<%loc_sdate%>", indicates the date in the short format using the current user regional and language settings
- "<%loc_ldate%>", indicates the date in the long format using the current user regional and language settings
- "<%loc_dsep%>", indicates the date separator using the current user regional and language settings (/)
- "<%h%>", hour in one or two digits, as needed (0 to 23)
- "<%hh%>", hour in two digits (00 to 23)
- "<%h12%>", hour in 12-hour time format, in one or two digits - [0(12),11]
- "<%hh12%>", hour in 12-hour time format, in two digits - [00(12),11]
- "<%n%>", minute in one or two digits, as needed (0 to 59)
- "<%nn%>", minute in two digits (00 to 59)
- "<%s%>", second in one or two digits, as needed (0 to 59)
- "<%ss%>", second in two digits (00 to 59)
- "<%AM/PM%>", twelve-hour clock with the uppercase letters "AM" or "PM", as appropriate
- "<%loc_AM/PM%>", indicates the time marker such as AM or PM using the current user regional and language settings
- "<%loc_A/P%>", indicates the one character time marker such as A or P using the current user regional and language settings
- "<%loc_time%>", indicates the time using the current user regional and language settings
- "<%loc_time24%>", indicates the time in 24 hours format without a time marker using the current user regional and language settings
- "<%loc_tsep%>", indicates the time separator using the current user regional and language settings (:)
- "<%loc_y%>", represents the Year only by the last digit, using current regional settings
- "<%loc_yy%>", represents the Year only by the last two digits, using current regional settings. A leading zero is added for single-digit years.
- "<%loc_yyyy%>", represents the Year by a full four or five digits, depending on the calendar used. Thai Buddhist and Korean calendars have five-digit years. The "yyyy" pattern shows five digits for these two calendars, and four digits for all other supported calendars. Calendars that have single-digit or two-digit years, such as for the Japanese Emperor era, are represented differently. A single-digit year is represented with a leading zero, for example, "03". A two-digit year is represented with two digits, for example, "13". No additional leading zeros are displayed
Also, dayWeekLabel property supports ex-HTML tags as follows:
- "<b>text</b>", displays the text in bold.
- "<li>text</li>", displays the text in italics.
- "<u>text</u>", underlines the text.
- "<s>text</s>", strike-through text
- "<a [id][;options]>text</a>", displays an anchor element that can be clicked
- "<font [family][;size]>text</font>", displays portions of text with a different font and/or different size.
- "<fgcolor color>text</fgcolor>", displays text with a specified foreground color.
- "<bgcolor color>text</bgcolor>", displays text with a specified background color.
- "<br>", defines a forced line-break
- "<r>", right aligns the text
- "<c>", centers the text
- "<img>key[:width]</img>", displays a custom-sized picture into the text. The key defines the name of the picture/image to be shown. The image can be added using the exontrol.HTMLPicture.Add() method.
- & glyph characters as "&" ( & ), "<" ( < ), ">" ( > ), "&qout;" ( quote character ) and "&#number;" ( the character with specified code ). For instance, "€" displays the EURO sign
- "<off offset>text</off>", defines the vertical offset to display the text.
- "<gra color[;mode[;blend]]>text</gra>", shows the text in gradient
- "<out color[;width]>text</out>", shows the text with outlined characters
- "<sha color[;width[;offset]]>text</sha>", shows the text with a shadow
|
Example
"" {string}, displays nothing
"<%mmm%>" {string}, displays three-letters of the month
"<%mmmm%> <%yyyy%>" {string}, displays the full month and year
"<b><%mmm%></b><r><fgcolor gray><font ;8><off 6><%yyyy%>" {string}, displays an combined ex-HTML format
SetDayMonthLabel
SetDayNonMonth(value)
The SetDayNonMonth() method shows or hides dates that are not part of the current month (day-view only).
Parameters:
Name |
Type |
Description |
value |
boolean
|
A boolean value that specifies whether the calendar displays the dates that are not part of the current month. |
SetDayNonMonth
SetDayNonMonthLabel(value)
The SetDayNonMonthLabel() method changes the ex-HTML label to show dates that are not part of the current month (day-view only).
Parameters:
Name |
Type |
Description |
value |
string
|
A string value that defines the ex-HTML label to display dates that are not part of the current month
The dayNonMonthLabel property can include any of the following fields:
- "<%d%>", day of the month in one or two numeric digits, as needed (1 to 31)
- "<%dd%>", day of the month in two numeric digits (01 to 31)
- "<%d1%>", first letter of the weekday (S to S)"
- "<%loc_d1%>", indicates day of week as a one-letter abbreviation using the current user settings
- "<%d2%>", first two letters of the weekday (Su to Sa)
- "<%loc_d2%>", indicates day of week as a two-letters abbreviation using the current user settings
- "<%d3%>", first three letters of the weekday (Sun to Sat)
- "<%loc_d3%>", equivalent with "<%loc_ddd%>"
- "<%ddd%>", first three letters of the weekday (Sun to Sat)
- "<%loc_ddd%>", indicates the day of week as a three-letter abbreviation using the current user regional and language settings
- "<%dddd%>", full name of the weekday (Sunday to Saturday)
- "<%loc_dddd%>", indicates day of week as its full name using the current user regional and language settings
- "<%i%>", displays the number instead the date
- "<%w%>", day of the week (1 to 7)
- "<%ww%>", week of the year (1 to 53)
- "<%m%>", month of the year in one or two numeric digits, as needed (1 to 12)
- "<%mr%>", month of the year in Roman numerals, as needed (I to XII)
- "<%mm%>", month of the year in two numeric digits (01 to 12)
- "<%m1%>", first letter of the month (J to D)
- "<%loc_m1%>", indicates month as a one-letter abbreviation using the current user settings
- "<%m2%>", first two letters of the month (Ja to De)
- "<%loc_m2%>", indicates month as a two-letters abbreviation using the current user settings
- "<%m3%>", first three letters of the month (Jan to Dec)
- "<%loc_m3%>", equivalent with "<%loc_mmm%>"
- "<%mmm%>", first three letters of the month (Jan to Dec)
- "<%loc_mmm%>", indicates month as a three-letter abbreviation using the current user regional and language settings
- "<%mmmm%>", full name of the month (January to December)
- "<%loc_mmmm%>", indicates month as its full name using the current user regional and language settings
- "<%q%>", Date displayed as the quarter of the year (1 to 4)
- "<%y%>", number of the day of the year (1 to 366)
- "<%yy%>", last two digits of the year (01 to 99)
- "<%yyyy%>", full year (0100 to 9999)
- "<%hy%>", date displayed as the half of the year (1 to 2)
- "<%loc_g%>", indicates period/era using the current user regional and language settings
- "<%loc_gg%>", indicates period/era using the current user regional and language settings
- "<%loc_sdate%>", indicates the date in the short format using the current user regional and language settings
- "<%loc_ldate%>", indicates the date in the long format using the current user regional and language settings
- "<%loc_dsep%>", indicates the date separator using the current user regional and language settings (/)
- "<%h%>", hour in one or two digits, as needed (0 to 23)
- "<%hh%>", hour in two digits (00 to 23)
- "<%h12%>", hour in 12-hour time format, in one or two digits - [0(12),11]
- "<%hh12%>", hour in 12-hour time format, in two digits - [00(12),11]
- "<%n%>", minute in one or two digits, as needed (0 to 59)
- "<%nn%>", minute in two digits (00 to 59)
- "<%s%>", second in one or two digits, as needed (0 to 59)
- "<%ss%>", second in two digits (00 to 59)
- "<%AM/PM%>", twelve-hour clock with the uppercase letters "AM" or "PM", as appropriate
- "<%loc_AM/PM%>", indicates the time marker such as AM or PM using the current user regional and language settings
- "<%loc_A/P%>", indicates the one character time marker such as A or P using the current user regional and language settings
- "<%loc_time%>", indicates the time using the current user regional and language settings
- "<%loc_time24%>", indicates the time in 24 hours format without a time marker using the current user regional and language settings
- "<%loc_tsep%>", indicates the time separator using the current user regional and language settings (:)
- "<%loc_y%>", represents the Year only by the last digit, using current regional settings
- "<%loc_yy%>", represents the Year only by the last two digits, using current regional settings. A leading zero is added for single-digit years.
- "<%loc_yyyy%>", represents the Year by a full four or five digits, depending on the calendar used. Thai Buddhist and Korean calendars have five-digit years. The "yyyy" pattern shows five digits for these two calendars, and four digits for all other supported calendars. Calendars that have single-digit or two-digit years, such as for the Japanese Emperor era, are represented differently. A single-digit year is represented with a leading zero, for example, "03". A two-digit year is represented with two digits, for example, "13". No additional leading zeros are displayed
Also, dayWeekLabel property supports ex-HTML tags as follows:
- "<b>text</b>", displays the text in bold.
- "<li>text</li>", displays the text in italics.
- "<u>text</u>", underlines the text.
- "<s>text</s>", strike-through text
- "<a [id][;options]>text</a>", displays an anchor element that can be clicked
- "<font [family][;size]>text</font>", displays portions of text with a different font and/or different size.
- "<fgcolor color>text</fgcolor>", displays text with a specified foreground color.
- "<bgcolor color>text</bgcolor>", displays text with a specified background color.
- "<br>", defines a forced line-break
- "<r>", right aligns the text
- "<c>", centers the text
- "<img>key[:width]</img>", displays a custom-sized picture into the text. The key defines the name of the picture/image to be shown. The image can be added using the exontrol.HTMLPicture.Add() method.
- & glyph characters as "&" ( & ), "<" ( < ), ">" ( > ), "&qout;" ( quote character ) and "&#number;" ( the character with specified code ). For instance, "€" displays the EURO sign
- "<off offset>text</off>", defines the vertical offset to display the text.
- "<gra color[;mode[;blend]]>text</gra>", shows the text in gradient
- "<out color[;width]>text</out>", shows the text with outlined characters
- "<sha color[;width[;offset]]>text</sha>", shows the text with a shadow
|
Example
"" {string}, displays nothing
"<%d%>" {string}, displays the day of the month in one or two numeric digits, as needed (1 to 31)
"<fgcolor lightgray><%d%></fgcolor>" {string}, displays the day of the month in one or two numeric digits, as needed (1 to 31) in gray
SetDayNonMonthLabel
SetDayWeekAllLabel(value)
The SetDayWeekAllLabel() method changes the ex-HTML label to show the first day of the month on the top-left corner of the calendar, when the week-number and week-days headers are present (day-view only).
Parameters:
Name |
Type |
Description |
value |
string
|
A string value that defines the ex-HTML label to display the first day of the month on the top-left corner of the calendar, when the week-number and week-days headers are present (day-view only).
The dayWeekAllLabel property can include any of the following fields:
- "<%d%>", day of the month in one or two numeric digits, as needed (1 to 31)
- "<%dd%>", day of the month in two numeric digits (01 to 31)
- "<%d1%>", first letter of the weekday (S to S)"
- "<%loc_d1%>", indicates day of week as a one-letter abbreviation using the current user settings
- "<%d2%>", first two letters of the weekday (Su to Sa)
- "<%loc_d2%>", indicates day of week as a two-letters abbreviation using the current user settings
- "<%d3%>", first three letters of the weekday (Sun to Sat)
- "<%loc_d3%>", equivalent with "<%loc_ddd%>"
- "<%ddd%>", first three letters of the weekday (Sun to Sat)
- "<%loc_ddd%>", indicates the day of week as a three-letter abbreviation using the current user regional and language settings
- "<%dddd%>", full name of the weekday (Sunday to Saturday)
- "<%loc_dddd%>", indicates day of week as its full name using the current user regional and language settings
- "<%i%>", displays the number instead the date
- "<%w%>", day of the week (1 to 7)
- "<%ww%>", week of the year (1 to 53)
- "<%m%>", month of the year in one or two numeric digits, as needed (1 to 12)
- "<%mr%>", month of the year in Roman numerals, as needed (I to XII)
- "<%mm%>", month of the year in two numeric digits (01 to 12)
- "<%m1%>", first letter of the month (J to D)
- "<%loc_m1%>", indicates month as a one-letter abbreviation using the current user settings
- "<%m2%>", first two letters of the month (Ja to De)
- "<%loc_m2%>", indicates month as a two-letters abbreviation using the current user settings
- "<%m3%>", first three letters of the month (Jan to Dec)
- "<%loc_m3%>", equivalent with "<%loc_mmm%>"
- "<%mmm%>", first three letters of the month (Jan to Dec)
- "<%loc_mmm%>", indicates month as a three-letter abbreviation using the current user regional and language settings
- "<%mmmm%>", full name of the month (January to December)
- "<%loc_mmmm%>", indicates month as its full name using the current user regional and language settings
- "<%q%>", Date displayed as the quarter of the year (1 to 4)
- "<%y%>", number of the day of the year (1 to 366)
- "<%yy%>", last two digits of the year (01 to 99)
- "<%yyyy%>", full year (0100 to 9999)
- "<%hy%>", date displayed as the half of the year (1 to 2)
- "<%loc_g%>", indicates period/era using the current user regional and language settings
- "<%loc_gg%>", indicates period/era using the current user regional and language settings
- "<%loc_sdate%>", indicates the date in the short format using the current user regional and language settings
- "<%loc_ldate%>", indicates the date in the long format using the current user regional and language settings
- "<%loc_dsep%>", indicates the date separator using the current user regional and language settings (/)
- "<%h%>", hour in one or two digits, as needed (0 to 23)
- "<%hh%>", hour in two digits (00 to 23)
- "<%h12%>", hour in 12-hour time format, in one or two digits - [0(12),11]
- "<%hh12%>", hour in 12-hour time format, in two digits - [00(12),11]
- "<%n%>", minute in one or two digits, as needed (0 to 59)
- "<%nn%>", minute in two digits (00 to 59)
- "<%s%>", second in one or two digits, as needed (0 to 59)
- "<%ss%>", second in two digits (00 to 59)
- "<%AM/PM%>", twelve-hour clock with the uppercase letters "AM" or "PM", as appropriate
- "<%loc_AM/PM%>", indicates the time marker such as AM or PM using the current user regional and language settings
- "<%loc_A/P%>", indicates the one character time marker such as A or P using the current user regional and language settings
- "<%loc_time%>", indicates the time using the current user regional and language settings
- "<%loc_time24%>", indicates the time in 24 hours format without a time marker using the current user regional and language settings
- "<%loc_tsep%>", indicates the time separator using the current user regional and language settings (:)
- "<%loc_y%>", represents the Year only by the last digit, using current regional settings
- "<%loc_yy%>", represents the Year only by the last two digits, using current regional settings. A leading zero is added for single-digit years.
- "<%loc_yyyy%>", represents the Year by a full four or five digits, depending on the calendar used. Thai Buddhist and Korean calendars have five-digit years. The "yyyy" pattern shows five digits for these two calendars, and four digits for all other supported calendars. Calendars that have single-digit or two-digit years, such as for the Japanese Emperor era, are represented differently. A single-digit year is represented with a leading zero, for example, "03". A two-digit year is represented with two digits, for example, "13". No additional leading zeros are displayed
Also, dayWeekLabel property supports ex-HTML tags as follows:
- "<b>text</b>", displays the text in bold.
- "<li>text</li>", displays the text in italics.
- "<u>text</u>", underlines the text.
- "<s>text</s>", strike-through text
- "<a [id][;options]>text</a>", displays an anchor element that can be clicked
- "<font [family][;size]>text</font>", displays portions of text with a different font and/or different size.
- "<fgcolor color>text</fgcolor>", displays text with a specified foreground color.
- "<bgcolor color>text</bgcolor>", displays text with a specified background color.
- "<br>", defines a forced line-break
- "<r>", right aligns the text
- "<c>", centers the text
- "<img>key[:width]</img>", displays a custom-sized picture into the text. The key defines the name of the picture/image to be shown. The image can be added using the exontrol.HTMLPicture.Add() method.
- & glyph characters as "&" ( & ), "<" ( < ), ">" ( > ), "&qout;" ( quote character ) and "&#number;" ( the character with specified code ). For instance, "€" displays the EURO sign
- "<off offset>text</off>", defines the vertical offset to display the text.
- "<gra color[;mode[;blend]]>text</gra>", shows the text in gradient
- "<out color[;width]>text</out>", shows the text with outlined characters
- "<sha color[;width[;offset]]>text</sha>", shows the text with a shadow
|
Example
"" {string}, displays nothing
"<b><%mr%>" {string}, displays month of the year in Roman numerals, as needed (I to XII) in bold
SetDayWeekAllLabel
The SetDayWeekHeader() method shows or hides the header to display the days of the week (day-view only).
Parameters:
Name |
Type |
Description |
value |
boolean
|
A boolean value that indicates whether the header to display the days of the week is visible or hidden. |
Example
false {boolean}, hides the header that displays the days of the week (day-view only).
true {boolean}, shows the header that displays the days of the week (day-view only).
SetDayWeekHeader
SetDayWeekLabel(value)
The SetDayWeekLabel() method changes the ex-HTML label to show the days of the week into the calendar's header (day-view only).
Parameters:
Name |
Type |
Description |
value |
string
|
A string value that defines the ex-HTML label to show the days of the week into the calendar's header
The dayWeekLabel property can include any of the following fields:
- "<%d%>", day of the month in one or two numeric digits, as needed (1 to 31)
- "<%dd%>", day of the month in two numeric digits (01 to 31)
- "<%d1%>", first letter of the weekday (S to S)"
- "<%loc_d1%>", indicates day of week as a one-letter abbreviation using the current user settings
- "<%d2%>", first two letters of the weekday (Su to Sa)
- "<%loc_d2%>", indicates day of week as a two-letters abbreviation using the current user settings
- "<%d3%>", first three letters of the weekday (Sun to Sat)
- "<%loc_d3%>", equivalent with "<%loc_ddd%>"
- "<%ddd%>", first three letters of the weekday (Sun to Sat)
- "<%loc_ddd%>", indicates the day of week as a three-letter abbreviation using the current user regional and language settings
- "<%dddd%>", full name of the weekday (Sunday to Saturday)
- "<%loc_dddd%>", indicates day of week as its full name using the current user regional and language settings
- "<%i%>", displays the number instead the date
- "<%w%>", day of the week (1 to 7)
- "<%ww%>", week of the year (1 to 53)
- "<%m%>", month of the year in one or two numeric digits, as needed (1 to 12)
- "<%mr%>", month of the year in Roman numerals, as needed (I to XII)
- "<%mm%>", month of the year in two numeric digits (01 to 12)
- "<%m1%>", first letter of the month (J to D)
- "<%loc_m1%>", indicates month as a one-letter abbreviation using the current user settings
- "<%m2%>", first two letters of the month (Ja to De)
- "<%loc_m2%>", indicates month as a two-letters abbreviation using the current user settings
- "<%m3%>", first three letters of the month (Jan to Dec)
- "<%loc_m3%>", equivalent with "<%loc_mmm%>"
- "<%mmm%>", first three letters of the month (Jan to Dec)
- "<%loc_mmm%>", indicates month as a three-letter abbreviation using the current user regional and language settings
- "<%mmmm%>", full name of the month (January to December)
- "<%loc_mmmm%>", indicates month as its full name using the current user regional and language settings
- "<%q%>", Date displayed as the quarter of the year (1 to 4)
- "<%y%>", number of the day of the year (1 to 366)
- "<%yy%>", last two digits of the year (01 to 99)
- "<%yyyy%>", full year (0100 to 9999)
- "<%hy%>", date displayed as the half of the year (1 to 2)
- "<%loc_g%>", indicates period/era using the current user regional and language settings
- "<%loc_gg%>", indicates period/era using the current user regional and language settings
- "<%loc_sdate%>", indicates the date in the short format using the current user regional and language settings
- "<%loc_ldate%>", indicates the date in the long format using the current user regional and language settings
- "<%loc_dsep%>", indicates the date separator using the current user regional and language settings (/)
- "<%h%>", hour in one or two digits, as needed (0 to 23)
- "<%hh%>", hour in two digits (00 to 23)
- "<%h12%>", hour in 12-hour time format, in one or two digits - [0(12),11]
- "<%hh12%>", hour in 12-hour time format, in two digits - [00(12),11]
- "<%n%>", minute in one or two digits, as needed (0 to 59)
- "<%nn%>", minute in two digits (00 to 59)
- "<%s%>", second in one or two digits, as needed (0 to 59)
- "<%ss%>", second in two digits (00 to 59)
- "<%AM/PM%>", twelve-hour clock with the uppercase letters "AM" or "PM", as appropriate
- "<%loc_AM/PM%>", indicates the time marker such as AM or PM using the current user regional and language settings
- "<%loc_A/P%>", indicates the one character time marker such as A or P using the current user regional and language settings
- "<%loc_time%>", indicates the time using the current user regional and language settings
- "<%loc_time24%>", indicates the time in 24 hours format without a time marker using the current user regional and language settings
- "<%loc_tsep%>", indicates the time separator using the current user regional and language settings (:)
- "<%loc_y%>", represents the Year only by the last digit, using current regional settings
- "<%loc_yy%>", represents the Year only by the last two digits, using current regional settings. A leading zero is added for single-digit years.
- "<%loc_yyyy%>", represents the Year by a full four or five digits, depending on the calendar used. Thai Buddhist and Korean calendars have five-digit years. The "yyyy" pattern shows five digits for these two calendars, and four digits for all other supported calendars. Calendars that have single-digit or two-digit years, such as for the Japanese Emperor era, are represented differently. A single-digit year is represented with a leading zero, for example, "03". A two-digit year is represented with two digits, for example, "13". No additional leading zeros are displayed
Also, dayWeekLabel property supports ex-HTML tags as follows:
- "<b>text</b>", displays the text in bold.
- "<li>text</li>", displays the text in italics.
- "<u>text</u>", underlines the text.
- "<s>text</s>", strike-through text
- "<a [id][;options]>text</a>", displays an anchor element that can be clicked
- "<font [family][;size]>text</font>", displays portions of text with a different font and/or different size.
- "<fgcolor color>text</fgcolor>", displays text with a specified foreground color.
- "<bgcolor color>text</bgcolor>", displays text with a specified background color.
- "<br>", defines a forced line-break
- "<r>", right aligns the text
- "<c>", centers the text
- "<img>key[:width]</img>", displays a custom-sized picture into the text. The key defines the name of the picture/image to be shown. The image can be added using the exontrol.HTMLPicture.Add() method.
- & glyph characters as "&" ( & ), "<" ( < ), ">" ( > ), "&qout;" ( quote character ) and "&#number;" ( the character with specified code ). For instance, "€" displays the EURO sign
- "<off offset>text</off>", defines the vertical offset to display the text.
- "<gra color[;mode[;blend]]>text</gra>", shows the text in gradient
- "<out color[;width]>text</out>", shows the text with outlined characters
- "<sha color[;width[;offset]]>text</sha>", shows the text with a shadow
|
Example
"" {string}, displays nothing
"<%d2%>" {string}, displays first two letters of the weekday (Su to Sa)
"<b><%d3%></b>" {string}, displays first thee letters of the weekday (Sun to Sat) in bold
SetDayWeekLabel
The SetDayWeekNoHeader() method shows or hides the header to display the week-number (day-view only).
Parameters:
Name |
Type |
Description |
value |
boolean
|
A boolean value that indicates whether the header to display the week-number is visible or hidden. |
Example
false {boolean}, hides the calendar's header that displays the week-number
true {boolean}, shows the calendar's header that displays the week-number
SetDayWeekNoHeader
SetDayWeekNoLabel(value)
The SetDayWeekNoLabel() method changes the ex-HTML label to show the week-number into the calendar's header (day-view only).
Parameters:
Name |
Type |
Description |
value |
string
|
A string value that defines the ex-HTML label to show the week-number into the calendar's header
The dayWeekNoLabel property can include any of the following fields:
- "<%d%>", day of the month in one or two numeric digits, as needed (1 to 31)
- "<%dd%>", day of the month in two numeric digits (01 to 31)
- "<%d1%>", first letter of the weekday (S to S)"
- "<%loc_d1%>", indicates day of week as a one-letter abbreviation using the current user settings
- "<%d2%>", first two letters of the weekday (Su to Sa)
- "<%loc_d2%>", indicates day of week as a two-letters abbreviation using the current user settings
- "<%d3%>", first three letters of the weekday (Sun to Sat)
- "<%loc_d3%>", equivalent with "<%loc_ddd%>"
- "<%ddd%>", first three letters of the weekday (Sun to Sat)
- "<%loc_ddd%>", indicates the day of week as a three-letter abbreviation using the current user regional and language settings
- "<%dddd%>", full name of the weekday (Sunday to Saturday)
- "<%loc_dddd%>", indicates day of week as its full name using the current user regional and language settings
- "<%i%>", displays the number instead the date
- "<%w%>", day of the week (1 to 7)
- "<%ww%>", week of the year (1 to 53)
- "<%m%>", month of the year in one or two numeric digits, as needed (1 to 12)
- "<%mr%>", month of the year in Roman numerals, as needed (I to XII)
- "<%mm%>", month of the year in two numeric digits (01 to 12)
- "<%m1%>", first letter of the month (J to D)
- "<%loc_m1%>", indicates month as a one-letter abbreviation using the current user settings
- "<%m2%>", first two letters of the month (Ja to De)
- "<%loc_m2%>", indicates month as a two-letters abbreviation using the current user settings
- "<%m3%>", first three letters of the month (Jan to Dec)
- "<%loc_m3%>", equivalent with "<%loc_mmm%>"
- "<%mmm%>", first three letters of the month (Jan to Dec)
- "<%loc_mmm%>", indicates month as a three-letter abbreviation using the current user regional and language settings
- "<%mmmm%>", full name of the month (January to December)
- "<%loc_mmmm%>", indicates month as its full name using the current user regional and language settings
- "<%q%>", Date displayed as the quarter of the year (1 to 4)
- "<%y%>", number of the day of the year (1 to 366)
- "<%yy%>", last two digits of the year (01 to 99)
- "<%yyyy%>", full year (0100 to 9999)
- "<%hy%>", date displayed as the half of the year (1 to 2)
- "<%loc_g%>", indicates period/era using the current user regional and language settings
- "<%loc_gg%>", indicates period/era using the current user regional and language settings
- "<%loc_sdate%>", indicates the date in the short format using the current user regional and language settings
- "<%loc_ldate%>", indicates the date in the long format using the current user regional and language settings
- "<%loc_dsep%>", indicates the date separator using the current user regional and language settings (/)
- "<%h%>", hour in one or two digits, as needed (0 to 23)
- "<%hh%>", hour in two digits (00 to 23)
- "<%h12%>", hour in 12-hour time format, in one or two digits - [0(12),11]
- "<%hh12%>", hour in 12-hour time format, in two digits - [00(12),11]
- "<%n%>", minute in one or two digits, as needed (0 to 59)
- "<%nn%>", minute in two digits (00 to 59)
- "<%s%>", second in one or two digits, as needed (0 to 59)
- "<%ss%>", second in two digits (00 to 59)
- "<%AM/PM%>", twelve-hour clock with the uppercase letters "AM" or "PM", as appropriate
- "<%loc_AM/PM%>", indicates the time marker such as AM or PM using the current user regional and language settings
- "<%loc_A/P%>", indicates the one character time marker such as A or P using the current user regional and language settings
- "<%loc_time%>", indicates the time using the current user regional and language settings
- "<%loc_time24%>", indicates the time in 24 hours format without a time marker using the current user regional and language settings
- "<%loc_tsep%>", indicates the time separator using the current user regional and language settings (:)
- "<%loc_y%>", represents the Year only by the last digit, using current regional settings
- "<%loc_yy%>", represents the Year only by the last two digits, using current regional settings. A leading zero is added for single-digit years.
- "<%loc_yyyy%>", represents the Year by a full four or five digits, depending on the calendar used. Thai Buddhist and Korean calendars have five-digit years. The "yyyy" pattern shows five digits for these two calendars, and four digits for all other supported calendars. Calendars that have single-digit or two-digit years, such as for the Japanese Emperor era, are represented differently. A single-digit year is represented with a leading zero, for example, "03". A two-digit year is represented with two digits, for example, "13". No additional leading zeros are displayed
Also, dayWeekLabel property supports ex-HTML tags as follows:
- "<b>text</b>", displays the text in bold.
- "<li>text</li>", displays the text in italics.
- "<u>text</u>", underlines the text.
- "<s>text</s>", strike-through text
- "<a [id][;options]>text</a>", displays an anchor element that can be clicked
- "<font [family][;size]>text</font>", displays portions of text with a different font and/or different size.
- "<fgcolor color>text</fgcolor>", displays text with a specified foreground color.
- "<bgcolor color>text</bgcolor>", displays text with a specified background color.
- "<br>", defines a forced line-break
- "<r>", right aligns the text
- "<c>", centers the text
- "<img>key[:width]</img>", displays a custom-sized picture into the text. The key defines the name of the picture/image to be shown. The image can be added using the exontrol.HTMLPicture.Add() method.
- & glyph characters as "&" ( & ), "<" ( < ), ">" ( > ), "&qout;" ( quote character ) and "&#number;" ( the character with specified code ). For instance, "€" displays the EURO sign
- "<off offset>text</off>", defines the vertical offset to display the text.
- "<gra color[;mode[;blend]]>text</gra>", shows the text in gradient
- "<out color[;width]>text</out>", shows the text with outlined characters
- "<sha color[;width[;offset]]>text</sha>", shows the text with a shadow
|
Example
"" {string}, displays nothing
"<%ww%>" {string}, displays the week of the year (1 to 53)
"<fgcolor red><%ww%></fgcolor>" {string}, displays the week of the year (1 to 53) in red
SetDayWeekNoLabel
SetEvents(oEventsDef)
The SetEvents() method defines the events of the control
Parameters:
Name |
Type |
Description |
oEventsDef |
object
|
Defines the events to add. The oEventsDef field can be any of the following:
- {array(any)}, defines multiple events, with specified options, as an array of [{EventOptions}] type
- {object}, defines multiple events, where each property(key) of the object defines the event with its options, of EventOptions type
|
- Since:
Example
Events = [{date: "#1/1/2001#", shape: "red"}], {array} defines a single event
Events =
{
"E1":
{
date: "#1/1/2001#",
shape: "rgba(255,0,0,0.5)"
},
"E2":
{
date: "#1/1/2001#",
shape: "rgba(255,255,0,0.5)"
}
}, {object} defines two events "E1" and "E2"
SetEvents
SetFlow(flow)
The SetFlow() method changes the flow the calendar displays the months.
Parameters:
Name |
Type |
Description |
flow |
Calendar.FlowEnum
|
A Calendar.FlowEnum value that determines whether the months gets arranged from left to right or top to bottom. If null, the flow field determines the flow to arrange the month as: if horizontally the flow is left to right, else top to bottom
The Calendar.FlowEnum type supports the following values:
- exLeftToRight(0), indicates that the next month gets arranged to the right of the current month
- exTopToBottom(1), indicates that the next month gets arranged to the bottom of the current month
|
Example
0 or Calendar.FlowEnum.exLeftToRight {number}, arranges months from left to right
1 or Calendar.FlowEnum.exTopToBottom {number}, arranges months from top to bottom
SetFlow
SetHlShapes(value)
The SetHlShapes() method changes the shape(s) to be applied on a part of the control, when it requires to be highlighted
Parameters:
Name |
Type |
Description |
value |
string
|
A string expression that defines the shape(s) to be applied on a part of the control, when it requires to be highlighted
The format of shapes property is:
"shape(part),shape(part),..."
where:
- "shape", defines the shape to apply on the UI part as one of the following:
◦ any of 140 color names any browser supports (such as red, blue, green, ...)
◦ hexadecimal colors, is specified with: #RRGGBB, where the RR (red), GG (green) and BB (blue) hexadecimal integers specify the components of the color. All values must be between 00 and FF (such as #0000ff which defines a blue background)
◦ hexadecimal colors with transparency, is specified with: #RRGGBBAA, where AA (alpha) value must be between 00 and FF (such as #0000ff80 which defines a semi-transparent blue background)
◦ RGB colors, is specified with the RGB(red, green, blue) function. Each parameter (red, green, and blue) defines the intensity of the color and can be an integer between 0 and 255( such as rgb(0,0,255) that defines a blue background)
◦ RGBA colors, are an extension of RGB color values with an alpha channel as RGBA(red, green, blue, alpha) function, where the alpha parameter is a number between 0.0 (fully transparent) and 1.0 (fully opaque) ( such as rgba(0,0,255,0.5) which defines a semi-transparent blue background)
◦ HSL colors, is specified with the HSL(hue, saturation, lightness) function, where hue is a degree on the color wheel (from 0 to 360) - 0 (or 360) is red, 120 is green, 240 is blue. saturation is a percentage value; 0% means a shade of gray and 100% is the full color. lightness is also a percentage; 0% is black, 100% is white. HSL stands for hue, saturation, and lightness - and represents a cylindrical-coordinate representation of colors (such as hsl(240, 100%, 50%) that defines a blue background)
◦ HSLA colors, are an extension of HSL color values with an alpha channel - which specifies the opacity of the object as HSLA(hue, saturation, lightness, alpha) function, where alpha parameter is a number between 0.0 (fully transparent) and 1.0 (fully opaque) (such as hsla(240, 100%, 50%,0.5) that defines a semi-transparent blue background)
◦ a JSON representation of the shape object to apply (while it starts with { character, such as '{"normal": {"primitive": "RoundRect","fillColor":"black","tfi": {"fgColor": "white"}}}')
◦ specifies the name of the field within the exontrol.Shapes.Calendar object (while it starts with a lowercase letter, such as today which refers to exontrol.Shapes.Calendar.today shape)
◦ specifies the name of the field within the exontrol.Shapes object (while it starts with an uppercase letter, such as Button which refers to exontrol.Shapes.Button shape)
- "part", defines the name of the part the shape is applied on (as defined bellow)
The shapes property supports any of the following parts:
- "p" (prev), defines the prev button (available for any view)
- "n" (next), defines the next button (available for any view)
The following parts are available while the control displays the day-view:
- "da" (day-all), indicates all objects of the month.
- "dmh" (day-month-header) object that indicates the header that displays the month
- "dm" (days-month) specifies all days displayed in the current month ( it can include also non-month days as well )
- "d" (day), specifies a day of the current month
- "dnm" (day-non-month), specifies a day that is not part of the current month, but it is still displayed
- "dt" (today), specifies today in the current month
- "ds" (day-select), indicates a selected date
- "de" (week-end), specifies a day of weekend
- "dwa" (day-weeks-all) indicates the top-left corner object, when the week-header and week-number headers are visible
- "dwh" (day-week-header) indicates the header that shows the days of the week
- "dw" (day-week) specifies a day into the week-header
- "dwnh" (day-week-number-header) indicates the header that displays the week-numbers
- "dwn" (day-week-number) specifies the week-number
- "dwnn" (day-week-number-non-month) specifies the week-number that is not part of the current month
The following parts are available while the control displays the month-view:
- "ma" (month-all) specifies the area to display the entire year
- "mh" (month-header) indicates the header for month-view (it displays the year)
- "mm" (month-month) indicates the portion of the layout that displays the months of the year (excludes its header)
- "m" (month) specifies a single month within the month-view
- "mt" (month-today), indicates the current month (the month that contains today)
- "ms" (month-select), indicates a month that contains a selected date
The following parts are available while the control displays the year-view:
- "ya" (year-all) that specifies the area to display the entire layout
- "yh" (year-header) that indicates the header for year-view (it displays the range of years)
- "yy" (year-years) that indicates the portion of the layout that displays the years (excludes its header)
- "y" (year) that specifies a single year within the year-view
- "yt" (year-today), specifies the year of today
- "ys" (year-select), indicates a year that contains a selected date
|
Example
"" {string}, no shape (no visual appearance is applied to any part of the control)
"star(d,dnm,dwa)" {string}, indicates that a exontrol.Shapes.Calendar.star object is applied on "d", "dnm" and "dwa" parts of the control.
"xxx(d),yyy(d,m),zzz(y)" {string}, specifies that the exontrol.Shapes.Calendar.xxx combined with exontrol.Shapes.Calendar.yyy object defines the visual appearance of "d" part of the control, exontrol.Shapes.RadialMenu.yyy object defines the visual appearance of "m" part of the control and exontrol.Shapes.RadialMenu.zzz object defines the visual appearance of "y" part of the control
SetHlShapes
SetLayout(layout, oOptsopt)
The SetLayout() method restores the UI layout of the object from an encoded string, previously returned by the GetLayout() method.
Parameters:
Name |
Type |
Attributes |
Description |
layout |
string
|
|
A string expression that defines the UI layout to apply |
oOpts |
object
|
<optional>
|
An object of {iMask,eMask,base64,equal,eol} type that defines options to serialize the UI layout as explained bellow:
- iMask {string}, specifies the mask (can include ? or * wild-characters) of properties to load
- eMask {string}, specifies the mask (can include ? or * wild-characters) of properties to exclude from load
- base64 {boolean}, Decodes the layout from BASE 64
- equal {string}, Indicates the separator between the name and the value. If missing, the = character is used
- eol {string}, A sequence of characters that can separate the properties. By default, any of \n, \r or ; separates the properties
|
- Since:
SetLayout
SetLocale(value)
The SetLocale() method specifies the language to format the calendar.
Parameters:
Name |
Type |
Description |
value |
string
|
A string with a BCP 47 language tag, or null to specify the browser's UI language. |
Example
null {null}, indicates that the browser's UI language is used.
"de" {string}, defines German locale
"ro" {string}, defines Romanian locale
SetLocale
SetLocked(value)
The SetLocked() method locks or unlocks the control.
Parameters:
Name |
Type |
Description |
value |
boolean
|
A boolean value that indicates whether the control is locked(protected) or unlocked |
Example
false {boolean}, unlocks the control (can select any date)
true {boolean}, locks the control (can't select any date)
SetLocked
SetMaxMonthX(value)
The SetMaxMonthX() method changes the maximum number of months horizontally displayed.
Parameters:
Name |
Type |
Description |
value |
number
|
A number value that specifies the maximum number of months horizontally displayed. |
Example
6 {number}, indicates that the calendar displays maximum six months.
SetMaxMonthX
SetMaxMonthY(value)
The SetMaxMonthY() method changes the maximum number of months vertically displayed.
Parameters:
Name |
Type |
Description |
value |
number
|
A number value that specifies the maximum number of months vertically displayed. |
Example
6 {number}, indicates that the calendar displays maximum six months.
SetMaxMonthY
SetMinMonthX(value)
The SetMinMonthX() method changes the minimum number of months horizontally displayed.
Parameters:
Name |
Type |
Description |
value |
number
|
A number value that specifies the minimum number of months horizontally displayed. |
Example
2 {number}, indicates that the calendar displays minimum two months
SetMinMonthX
SetMinMonthY(value)
The SetMinMonthY() method changes the minimum number of months vertically displayed.
Parameters:
Name |
Type |
Description |
value |
number
|
A number value that specifies the minimum number of months vertically displayed. |
Example
2 {number}, indicates that the calendar displays minimum two months
SetMinMonthY
SetMode(mode)
The SetMode() method changes the orientation the calendar displays the days of the weeks
Parameters:
Name |
Type |
Description |
mode |
Calendar.ModeEnum
|
A Calendar.ModeEnum value that specifies the orientation the calendar displays the days of the weeks
The Calendar.ModeEnum type supports the following values:
- exVertical(0), specifies that the days of the week are vertically arranged
- exHorizontal(1), specifies that the days of the week are horizontally arranged
|
Example
0 or Calendar.ModeEnum.exVertical {number}, shows vertically the week days
1 or Calendar.ModeEnum.exHorizontal {number}, shows horizontally the week days
SetMode
SetMonthAlign(value)
The SetMonthAlign() method aligns the month's label, while the control displays the month-view.
Parameters:
Name |
Type |
Description |
value |
exontrol.DrawTextFormatEnum
|
A exontrol.DrawTextFormatEnum value that aligns the month's label, while the control displays the month-view.
The exontrol.DrawTextFormatEnum type support the following flags:
- exTextAlignTop (0x00), justifies the text to the top of the rectangle
- exTextAlignLeft (0x00), aligns text to the left
- exTextAlignCenter (0x01), centers text horizontally in the rectangle
- exTextAlignRight (0x02), aligns text to the right
- exTextAlignVCenter (0x04), centers text vertically
- exTextAlignBottom (0x08), justifies the text to the bottom of the rectangle.
- exTextAlignMask (0x0F), specifies the mask for text's alignment.
- exTextWordBreak (0x10), breaks words. Lines are automatically broken between words if a word would extend past the edge of the rectangle specified by the lpRect parameter. A carriage return-line feed sequence also breaks the line. If this is not specified, output is on one line.
- exTextSingleLine (0x20), displays text on a single line only. Carriage returns and line feeds do not break the line.
- exTextExpandTabs (0x40), expands tab characters. The default number of characters per tab is eight.
- exPlainText (0x80), treats the text as plain text.
- exTextNoClip (0x0100), draws without clipping.
- exHTMLTextNoColors (0x0200), ignores the and tags.
- exTextCalcRect (0x0400), determines the width and height of the text.
- exHTMLTextNoTags (0x0800), ignores all HTML tags.
- exTextPathEllipsis (0x4000), for displayed text, replaces characters in the middle of the string with ellipses so that the result fits in the specified rectangle. If the string contains backslash (\) characters, exTextPathEllipsis preserves as much as possible of the text after the last backslash.
- exTextEndEllipsis (0x8000), for displayed text, if the end of a string does not fit in the rectangle, it is truncated and ellipses are added. If a word that is not at the end of the string goes beyond the limits of the rectangle, it is truncated without ellipses.
- exTextWordEllipsis (0x040000), truncates any word that does not fit in the rectangle and adds ellipses.
|
Example
null {null}, centers the label
32 or exontrol.DrawTextFormatEnum.exTextSingleLine {number}, defines a single-line label
0x2A or exontrol.DrawTextFormatEnum.exTextSingleLine | exontrol.DrawTextFormatEnum.exTextAlignRight | exontrol.DrawTextFormatEnum.exTextAlignBottom {number}, defines a single-line label right/bottom-aligned
SetMonthAlign
SetMonthLabel(value)
The SetMonthLabel() method changes the ex-HTML string that can include expression fields (<%...%>) to display the month while the control displays the month-view.
Parameters:
Name |
Type |
Description |
value |
string
|
A string value that indicates a HTML string that can include expression fields (<%...%>) to display the month while the control displays the month-view.
The monthLabel property can include any of the following fields:
- "<%d%>", day of the month in one or two numeric digits, as needed (1 to 31)
- "<%dd%>", day of the month in two numeric digits (01 to 31)
- "<%d1%>", first letter of the weekday (S to S)"
- "<%loc_d1%>", indicates day of week as a one-letter abbreviation using the current user settings
- "<%d2%>", first two letters of the weekday (Su to Sa)
- "<%loc_d2%>", indicates day of week as a two-letters abbreviation using the current user settings
- "<%d3%>", first three letters of the weekday (Sun to Sat)
- "<%loc_d3%>", equivalent with "<%loc_ddd%>"
- "<%ddd%>", first three letters of the weekday (Sun to Sat)
- "<%loc_ddd%>", indicates the day of week as a three-letter abbreviation using the current user regional and language settings
- "<%dddd%>", full name of the weekday (Sunday to Saturday)
- "<%loc_dddd%>", indicates day of week as its full name using the current user regional and language settings
- "<%i%>", displays the number instead the date
- "<%w%>", day of the week (1 to 7)
- "<%ww%>", week of the year (1 to 53)
- "<%m%>", month of the year in one or two numeric digits, as needed (1 to 12)
- "<%mr%>", month of the year in Roman numerals, as needed (I to XII)
- "<%mm%>", month of the year in two numeric digits (01 to 12)
- "<%m1%>", first letter of the month (J to D)
- "<%loc_m1%>", indicates month as a one-letter abbreviation using the current user settings
- "<%m2%>", first two letters of the month (Ja to De)
- "<%loc_m2%>", indicates month as a two-letters abbreviation using the current user settings
- "<%m3%>", first three letters of the month (Jan to Dec)
- "<%loc_m3%>", equivalent with "<%loc_mmm%>"
- "<%mmm%>", first three letters of the month (Jan to Dec)
- "<%loc_mmm%>", indicates month as a three-letter abbreviation using the current user regional and language settings
- "<%mmmm%>", full name of the month (January to December)
- "<%loc_mmmm%>", indicates month as its full name using the current user regional and language settings
- "<%q%>", Date displayed as the quarter of the year (1 to 4)
- "<%y%>", number of the day of the year (1 to 366)
- "<%yy%>", last two digits of the year (01 to 99)
- "<%yyyy%>", full year (0100 to 9999)
- "<%hy%>", date displayed as the half of the year (1 to 2)
- "<%loc_g%>", indicates period/era using the current user regional and language settings
- "<%loc_gg%>", indicates period/era using the current user regional and language settings
- "<%loc_sdate%>", indicates the date in the short format using the current user regional and language settings
- "<%loc_ldate%>", indicates the date in the long format using the current user regional and language settings
- "<%loc_dsep%>", indicates the date separator using the current user regional and language settings (/)
- "<%h%>", hour in one or two digits, as needed (0 to 23)
- "<%hh%>", hour in two digits (00 to 23)
- "<%h12%>", hour in 12-hour time format, in one or two digits - [0(12),11]
- "<%hh12%>", hour in 12-hour time format, in two digits - [00(12),11]
- "<%n%>", minute in one or two digits, as needed (0 to 59)
- "<%nn%>", minute in two digits (00 to 59)
- "<%s%>", second in one or two digits, as needed (0 to 59)
- "<%ss%>", second in two digits (00 to 59)
- "<%AM/PM%>", twelve-hour clock with the uppercase letters "AM" or "PM", as appropriate
- "<%loc_AM/PM%>", indicates the time marker such as AM or PM using the current user regional and language settings
- "<%loc_A/P%>", indicates the one character time marker such as A or P using the current user regional and language settings
- "<%loc_time%>", indicates the time using the current user regional and language settings
- "<%loc_time24%>", indicates the time in 24 hours format without a time marker using the current user regional and language settings
- "<%loc_tsep%>", indicates the time separator using the current user regional and language settings (:)
- "<%loc_y%>", represents the Year only by the last digit, using current regional settings
- "<%loc_yy%>", represents the Year only by the last two digits, using current regional settings. A leading zero is added for single-digit years.
- "<%loc_yyyy%>", represents the Year by a full four or five digits, depending on the calendar used. Thai Buddhist and Korean calendars have five-digit years. The "yyyy" pattern shows five digits for these two calendars, and four digits for all other supported calendars. Calendars that have single-digit or two-digit years, such as for the Japanese Emperor era, are represented differently. A single-digit year is represented with a leading zero, for example, "03". A two-digit year is represented with two digits, for example, "13". No additional leading zeros are displayed
Also, dayWeekLabel property supports ex-HTML tags as follows:
- "<b>text</b>", displays the text in bold.
- "<li>text</li>", displays the text in italics.
- "<u>text</u>", underlines the text.
- "<s>text</s>", strike-through text
- "<a [id][;options]>text</a>", displays an anchor element that can be clicked
- "<font [family][;size]>text</font>", displays portions of text with a different font and/or different size.
- "<fgcolor color>text</fgcolor>", displays text with a specified foreground color.
- "<bgcolor color>text</bgcolor>", displays text with a specified background color.
- "<br>", defines a forced line-break
- "<r>", right aligns the text
- "<c>", centers the text
- "<img>key[:width]</img>", displays a custom-sized picture into the text. The key defines the name of the picture/image to be shown. The image can be added using the exontrol.HTMLPicture.Add() method.
- & glyph characters as "&" ( & ), "<" ( < ), ">" ( > ), "&qout;" ( quote character ) and "&#number;" ( the character with specified code ). For instance, "€" displays the EURO sign
- "<off offset>text</off>", defines the vertical offset to display the text.
- "<gra color[;mode[;blend]]>text</gra>", shows the text in gradient
- "<out color[;width]>text</out>", shows the text with outlined characters
- "<sha color[;width[;offset]]>text</sha>", shows the text with a shadow
|
Example
"" {string}, displays nothing
"<%mmm%>" {string}, displays first three letters of the month (Jan to Dec)
SetMonthLabel
SetMonthYearAlign(value)
The SetMonthYearAlign() method aligns the year's label, while the control displays the month-view.
Parameters:
Name |
Type |
Description |
value |
exontrol.DrawTextFormatEnum
|
A exontrol.DrawTextFormatEnum value that aligns the year's label, while the control displays the month-view.
The exontrol.DrawTextFormatEnum type support the following flags:
- exTextAlignTop (0x00), justifies the text to the top of the rectangle
- exTextAlignLeft (0x00), aligns text to the left
- exTextAlignCenter (0x01), centers text horizontally in the rectangle
- exTextAlignRight (0x02), aligns text to the right
- exTextAlignVCenter (0x04), centers text vertically
- exTextAlignBottom (0x08), justifies the text to the bottom of the rectangle.
- exTextAlignMask (0x0F), specifies the mask for text's alignment.
- exTextWordBreak (0x10), breaks words. Lines are automatically broken between words if a word would extend past the edge of the rectangle specified by the lpRect parameter. A carriage return-line feed sequence also breaks the line. If this is not specified, output is on one line.
- exTextSingleLine (0x20), displays text on a single line only. Carriage returns and line feeds do not break the line.
- exTextExpandTabs (0x40), expands tab characters. The default number of characters per tab is eight.
- exPlainText (0x80), treats the text as plain text.
- exTextNoClip (0x0100), draws without clipping.
- exHTMLTextNoColors (0x0200), ignores the and tags.
- exTextCalcRect (0x0400), determines the width and height of the text.
- exHTMLTextNoTags (0x0800), ignores all HTML tags.
- exTextPathEllipsis (0x4000), for displayed text, replaces characters in the middle of the string with ellipses so that the result fits in the specified rectangle. If the string contains backslash (\) characters, exTextPathEllipsis preserves as much as possible of the text after the last backslash.
- exTextEndEllipsis (0x8000), for displayed text, if the end of a string does not fit in the rectangle, it is truncated and ellipses are added. If a word that is not at the end of the string goes beyond the limits of the rectangle, it is truncated without ellipses.
- exTextWordEllipsis (0x040000), truncates any word that does not fit in the rectangle and adds ellipses.
|
Example
null {null}, centers the label
32 or exontrol.DrawTextFormatEnum.exTextSingleLine {number}, defines a single-line label
0x2A or exontrol.DrawTextFormatEnum.exTextSingleLine | exontrol.DrawTextFormatEnum.exTextAlignRight | exontrol.DrawTextFormatEnum.exTextAlignBottom {number}, defines a single-line label right/bottom-aligned
SetMonthYearAlign
SetOptions(nOptions, bIncludeAll) → {boolean}
The SetOptions() method applies new options to the Calendar element
Parameters:
Name |
Type |
Description |
nOptions |
object
|
Specifies an object of Calendar.Options type that indicates the new options to apply |
bIncludeAll |
boolean
|
Indicates whether all fields of nOptions are included in the element's options object |
Returns:
Returns true, if there were options applied to the element
-
Type
-
boolean
SetOptions
SetPad(value)
The SetPad() method changes the padding to be applied on dates of the calendar.
Parameters:
Name |
Type |
Description |
value |
number
|
string
|
Array.<number>
|
Specifies the padding to be applied on dates of the calendar. |
Example
null {null}, indicates that the default-padding field is used ([4,2])
0 {number}, indicates no padding
"8,4" {string}, increases the object's width with 2 * 8-pixels and object's height with 2 * 4-pixels
[8,4] {array}, increases the object's width with 2 * 8-pixels and object's height with 2 * 4-pixels
SetPad
SetPadCal(value)
The SetPadCal() method changes the padding to be applied on the calendar.
Parameters:
Name |
Type |
Description |
value |
number
|
string
|
Array.<number>
|
Specifies the padding to be applied on the calendar. |
Example
null {null}, indicates that the default-padding field is used (4)
0 {number}, indicates no padding
"8,4" {string}, increases the object's width with 2 * 8-pixels and object's height with 2 * 4-pixels
[8,4] {array}, increases the object's width with 2 * 8-pixels and object's height with 2 * 4-pixels
SetPadCal
SetReadOnly(value)
The SetReadOnly() method sets the control in read-only mode
Parameters:
Name |
Type |
Description |
value |
boolean
|
A boolean value that indicates whether the control is read-only (the user can't select new dates, but can browse for any date) |
- Since:
Example
false {boolean}, unlocks the control (can select any date)
true {boolean}, locks the control (can't select any date)
SetReadOnly
SetSelection(value)
The SetSelection() method changes the control's selection.
Parameters:
Name |
Type |
Description |
value |
any
|
Indicates the control's selection, as one of the following:
- {null}, clears the control's selection
- {string}, defines the date to select in string-format as "#MM/DD/YYYY[ HH:mm:ss]#" 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) (since 1.3)
- {number}, integer value representing the year of the date to be selected. For instance, 2022 goes for "Jan 1st, 2022"
- {Date}, indicates a JavaScript date to be selected
- {array}, indicates a collection of dates to be selected, as an array of [date] type, where date could be null, string, number or a Date expression
|
Example
null {null}, clears the control's selection
[null] {array}, selects today
"#1/15/2022#" or "2022-1-15" {string}, selects the specified date
2022 {number}, selects "Jan 1st, 2022"
Date.Today().NextDay(1) {Date}, selects tomorrow
Calendar.Collect(Date.Today(), null, Calendar.CollectEnum.exWeek) {Date}, selects the current week (in case the control allows multiple selection, else it selects the first day of the current week)
[null,Date.Today().NextDay(1)] {array}, selects today and tommorow date
["#1/13/2022#","#1/15/2022#"] {array}, selects Jan 13 and 15 of 2022
SetSelection
SetShapes(value)
The SetShapes() method changes the shapes each part of the control can display.
Parameters:
Name |
Type |
Description |
value |
string
|
A string expression that defines the shapes each part of the control can display.
The format of shapes property is:
"shape(part),shape(part),..."
where:
- "shape", defines the shape to apply on the UI part as one of the following:
◦ any of 140 color names any browser supports (such as red, blue, green, ...)
◦ hexadecimal colors, is specified with: #RRGGBB, where the RR (red), GG (green) and BB (blue) hexadecimal integers specify the components of the color. All values must be between 00 and FF (such as #0000ff which defines a blue background)
◦ hexadecimal colors with transparency, is specified with: #RRGGBBAA, where AA (alpha) value must be between 00 and FF (such as #0000ff80 which defines a semi-transparent blue background)
◦ RGB colors, is specified with the RGB(red, green, blue) function. Each parameter (red, green, and blue) defines the intensity of the color and can be an integer between 0 and 255( such as rgb(0,0,255) that defines a blue background)
◦ RGBA colors, are an extension of RGB color values with an alpha channel as RGBA(red, green, blue, alpha) function, where the alpha parameter is a number between 0.0 (fully transparent) and 1.0 (fully opaque) ( such as rgba(0,0,255,0.5) which defines a semi-transparent blue background)
◦ HSL colors, is specified with the HSL(hue, saturation, lightness) function, where hue is a degree on the color wheel (from 0 to 360) - 0 (or 360) is red, 120 is green, 240 is blue. saturation is a percentage value; 0% means a shade of gray and 100% is the full color. lightness is also a percentage; 0% is black, 100% is white. HSL stands for hue, saturation, and lightness - and represents a cylindrical-coordinate representation of colors (such as hsl(240, 100%, 50%) that defines a blue background)
◦ HSLA colors, are an extension of HSL color values with an alpha channel - which specifies the opacity of the object as HSLA(hue, saturation, lightness, alpha) function, where alpha parameter is a number between 0.0 (fully transparent) and 1.0 (fully opaque) (such as hsla(240, 100%, 50%,0.5) that defines a semi-transparent blue background)
◦ a JSON representation of the shape object to apply (while it starts with { character, such as '{"normal": {"primitive": "RoundRect","fillColor":"black","tfi": {"fgColor": "white"}}}')
◦ specifies the name of the field within the exontrol.Shapes.Calendar object (while it starts with a lowercase letter, such as today which refers to exontrol.Shapes.Calendar.today shape)
◦ specifies the name of the field within the exontrol.Shapes object (while it starts with an uppercase letter, such as Button which refers to exontrol.Shapes.Button shape)
- "part", defines the name of the part the shape is applied on (as defined bellow)
The shapes property supports any of the following parts:
- "p" (prev), defines the prev button (available for any view)
- "n" (next), defines the next button (available for any view)
The following parts are available while the control displays the day-view:
- "da" (day-all), indicates all objects of the month.
- "dmh" (day-month-header) object that indicates the header that displays the month
- "dm" (days-month) specifies all days displayed in the current month ( it can include also non-month days as well )
- "d" (day), specifies a day of the current month
- "dnm" (day-non-month), specifies a day that is not part of the current month, but it is still displayed
- "dt" (today), specifies today in the current month
- "ds" (day-select), indicates a selected date
- "de" (week-end), specifies a day of weekend
- "dwa" (day-weeks-all) indicates the top-left corner object, when the week-header and week-number headers are visible
- "dwh" (day-week-header) indicates the header that shows the days of the week
- "dw" (day-week) specifies a day into the week-header
- "dwnh" (day-week-number-header) indicates the header that displays the week-numbers
- "dwn" (day-week-number) specifies the week-number
- "dwnn" (day-week-number-non-month) specifies the week-number that is not part of the current month
The following parts are available while the control displays the month-view:
- "ma" (month-all) specifies the area to display the entire year
- "mh" (month-header) indicates the header for month-view (it displays the year)
- "mm" (month-month) indicates the portion of the layout that displays the months of the year (excludes its header)
- "m" (month) specifies a single month within the month-view
- "mt" (month-today), indicates the current month (the month that contains today)
- "ms" (month-select), indicates a month that contains a selected date
The following parts are available while the control displays the year-view:
- "ya" (year-all) that specifies the area to display the entire layout
- "yh" (year-header) that indicates the header for year-view (it displays the range of years)
- "yy" (year-years) that indicates the portion of the layout that displays the years (excludes its header)
- "y" (year) that specifies a single year within the year-view
- "yt" (year-today), specifies the year of today
- "ys" (year-select), indicates a year that contains a selected date
|
Example
null {null}, specifies the default visual appearance
"" {string}, no shape (no visual appearance is applied to any part of the control)
"red(dt)", "#FF0000(dt)", "rgb(255,0,0)(dt)", "rgba(255,0,0,1)(dt)" {string}, shows "today" in red
'{"normal":{"fillColor":"lightgray","primitive":"Circle"},"hover":{"frameColor":"black"}}(d)' {string}, shows all-days within a circle, and draws a black-frame when hovers it
"xxx(d),yyy(d,m),zzz(y)" {string}, specifies that the exontrol.Shapes.Calendar.xxx combined with exontrol.Shapes.Calendar.yyy object defines the visual appearance of "d" part of the control, exontrol.Shapes.Calendar.yyy object defines the visual appearance of "m" part of the control and exontrol.Shapes.Calendar.zzz object defines the visual appearance of "y" part of the control
SetShapes
SetSingleSel(value)
The SetSingleSel() method specifies whether the control supports single, multiple, toggle selection.
Parameters:
Name |
Type |
Description |
value |
Calendar.SingleSelEnum
|
An OR combination of Calendar.SingleSelEnum flags to specify how user can select dates
The Calendar.SingleSelEnum type supports the following flags:
- exDisableSel(0), specifies that the control's selection is disabled (can not be combined with any other flags)
- exEnableSel(1), specifies that the control's selection is enabled (multiple-selection, unless the exSingleSel is set )
- exSingleSel(2), specifies that the user can select a date only
- exToggleSel(4), specifies that the date's selection state is toggled once the user clicks a date.
- exDisableCtrlSel(8), disables toggling the date's selection state when user clicks a date, while CTRL modifier key is pressed.
- exDisableShiftSel(16), disables selecting dates using the SHIFT key.
- exDisableDrag(32), disables selecting dates by drag.
|
Example
0 or Calendar.SingleSelEnum.exDisableSel {number}, disables selecting any date
3 or Calendar.SingleSelEnum.exSingleSel | Calendar.SingleSelEnum.exEnableSel {number}, enables control's single selection, so only a single date can be selected
6 or Calendar.SingleSelEnum.exToggleSel | Calendar.SingleSelEnum.exSingleSel {number}, enables control's single and toggle selection, which means that once a date is selected it gets unselected once it is clicked, or reverse, and only a single-date can be selected at once.
SetSingleSel
SetSmoothDate(year, month, day) → {boolean}
The SetSmoothDate() method changes smoothly the calendar's date to specified date.
Parameters:
Name |
Type |
Description |
year |
null
|
number
|
string
|
date
|
A value of one of the following types:
- Integer value representing the year of the date to be created
- String expression in format "#MM/DD/YYYY#" or ISO 8601 string representation such as "2011-10-10" (date-only form) (since 1.3)
- Date type, indicates the date to be copied
- missing/null/undefined, indicates the current date and time (equivalent of Now)
|
month |
number
|
Integer value representing the month, beginning with 1 for January to 12 for December. If missing/null/undefined, 1 (January) is used instead |
day |
number
|
Integer value representing the day of the month, beginning with 1 for the first day of the month, 2 for the second day, .... If missing/null/undefined, 1-st is used instead |
Returns:
Returns true, if the calendar's date has been changed
-
Type
-
boolean
SetSmoothDate
The SetSmoothScroll() method specifies whether the size of the calendar's date to be relative to the font, client or fixed.
Parameters:
Name |
Type |
Description |
value |
number
|
A number value that specifies the time in ms the calendar's date scrolls to other value. |
Example
0 {number}, no smooth changes once the control goes from a layout to another
250 {number}, specifies that a smooth-transition is performed from a layout to another for 250 ms.
SetSmoothScroll
SetSmoothSel(value)
The SetSmoothSel() method sets the time in ms the calendar's selection goes from one state to another.
Parameters:
Name |
Type |
Description |
value |
number
|
A number value that specifies the time in ms the calendar's selection goes from one state to another. |
Example
0 {number}, no smooth changes once the control goes from a layout to another
125 {number}, specifies that a smooth-transition is performed from a layout to another for 125 ms.
SetSmoothSel
SetTfi(value)
The SetTfi() method sets the font attributes to apply on captions of the control.
Parameters:
Name |
Type |
Description |
value |
string
|
object
|
Indicates a string representation such as "b monospace 16" or as an object such as {bold: true, fontName: "monospace", fontSize: 16}.
The value as {string} supports any of the following keywords (each keyword can be specified using first letters only such as "b" for "bold) separated by space characters:
- bold, displays the text in bold (equivalent of <b> tag)
- italic, displays the text in italics (equivalent of <i> tag)
- underline, underlines the text (equivalent of <u> tag)
- strikeout, specifies whether the text is strike-through (equivalent of <s> tag)
- <fontName name>, specifies the font's family (equivalent of <font name> tag)
- <fontSize size>, specifies the size of the font (equivalent of <font ;size> tag)
- <fgColor CSSColor>, specifies the text's foreground color (equivalent of <fgcolor> tag)
- <bgColor CSSColor>, specifies the text's background color (equivalent of <bgcolor> tag)
- <shaColor CSSColor;width;offset>, defines the text's shadow (equivalent of <sha color;width;offset> tag)
- <outColor CSSColor>, shows the text with outlined characters (CSScolor) (equivalent of <out color> tag)
- <graColor CSSColor;mode;blend>, defines a gradient text (equivalent of <gra color;mode;blend> tag)
Any other word within the string value that's not recognized as a keyword is interpreted as:
- name of the font (not a number), specifies the font's family (equivalent of <font name> tag)
- size of the font (number), specifies the size of the font (equivalent of <font ;size> tag)
The value as {object} supports any of the following fields:
- bold {boolean}, displays the text in bold (equivalent of <b> tag)
- italic {boolean}, displays the text in italics (equivalent of <i> tag)
- underline {boolean}, underlines the text (equivalent of <u> tag)
- strikeout {boolean}, specifies whether the text is strike-through (equivalent of <s> tag)
- fontName {string}, specifies the font's family (equivalent of <font name> tag)
- fontSize {number}, specifies the size of the font (equivalent of <font ;size> tag)
- fgColor {string}, specifies the text's foreground color (CSScolor) (equivalent of <fgcolor> tag)
- bgColor {string}, specifies the text's background color (CSScolor) (equivalent of <bgcolor> tag)
- shaColor {object}, specifies an object of {color, width, offset} type that defines the text's shadow (equivalent of <sha color;width;offset> tag), where:
- color {string}, defines the color of the text's shadow (CSScolor)
- width {number}, defines the size of the text's shadow
- offset {number}, defines the offset to show the text's shadow relative to the text
- outColor {string}, shows the text with outlined characters (CSScolor) (equivalent of <out color> tag)
- graColor {object}, specifies an object of {color, mode, blend} type that defines a gradient text (equivalent of <gra color;mode;blend> tag), where:
- color {string}, defines the gradient-color (CSScolor)
- mode {number}, defines the gradient mode as a value between 0 and 4
- blend {number}, defines the gradient blend as a value between 0 and 1
CSSColor or CSS legal color values can be specified by the following methods:
- Hexadecimal colors, is specified with: #RRGGBB, where the RR (red), GG (green) and BB (blue) hexadecimal integers specify the components of the color. All values must be between 00 and FF. For example, #0000ff value is rendered as blue, because the blue component is set to its highest value (ff) and the others are set to 00.
- Hexadecimal colors with transparency, is specified with: #RRGGBBAA, where AA (alpha) value must be between 00 and FF. For example, #0000ff80 defines a semi-transparent blue.
- RGB colors, is specified with the RGB(red, green, blue) function. Each parameter (red, green, and blue) defines the intensity of the color and can be an integer between 0 and 255. For example, rgb(0,0,255) defines the blue color.
- RGBA colors, are an extension of RGB color values with an alpha channel as RGBA(red, green, blue, alpha) function, where the alpha parameter is a number between 0.0 (fully transparent) and 1.0 (fully opaque). For example, rgba(0,0,255,0.5) defines a semi-transparent blue.
- HSL colors, is specified with the HSL(hue, saturation, lightness) function, where hue is a degree on the color wheel (from 0 to 360) - 0 (or 360) is red, 120 is green, 240 is blue. saturation is a percentage value; 0% means a shade of gray and 100% is the full color. lightness is also a percentage; 0% is black, 100% is white. HSL stands for hue, saturation, and lightness - and represents a cylindrical-coordinate representation of colors. For example, hsl(240, 100%, 50%) defines the blue color.
- HSLA colors, are an extension of HSL color values with an alpha channel - which specifies the opacity of the object as HSLA(hue, saturation, lightness, alpha) function, where alpha parameter is a number between 0.0 (fully transparent) and 1.0 (fully opaque). For example, hsla(240, 100%, 50%,0.5) defines a semi-transparent blue.
- Predefined/Cross-browser color names, 140 color names are predefined in the HTML and CSS color specification. For example, blue defines the blue color.
|
Example
null {null}, the tfi field is ignored
"bold monospace 16 <fg blue>" {string}, defines Monospace font of 16px height, bold and blue
{bold: true, fontName: "monospace", fontSize: 16, fgColor: "blue"} {object}, defines Monospace font of 16px height, bold and blue
SetTfi
The SetToolTipDelay() method changes how long the mouse pointer must point to an object before the tool tip appears
Parameters:
Name |
Type |
Description |
value |
number
|
A value that specifies how long the mouse pointer must point to an object before the tool tip appears. |
- Since:
Example
0 {number}, the tooltip is shown "immediately"
128 {number}, the tooltip is displayed in 128 ms.
SetToolTipDelay
The SetToolTipPopDelay() method changes the period in ms of time the tool top remains visible if the mouse pointer is stationary within a control
Parameters:
Name |
Type |
Description |
value |
number
|
A value that specifies the period in ms of time the tool top remains visible if the mouse pointer is stationary within a control. |
- Since:
Example
0 {number}, no tooltip is shown for any object (disabled)
-1 {number}, the tooltip stays indefinitely (negative)
1000 {number}, the tooltip is visible for 1 second
SetToolTipPopDelay
The SetToolTipWidth() method changes the width of the tooltip window, in pixels
Parameters:
Name |
Type |
Description |
value |
number
|
A value that specifies the width of the tooltip window, in pixels. |
- Since:
Example
0 {number}, no tooltip is shown for any object (disabled)
-1 {number}, the tooltip's content is displayed on a single line (without limit the width of it)
300 {number}, the tooltip's max-width is 300 pixels
SetToolTipWidth
SetWheelChange(value)
The SetWheelChange() method changes the amount the calendar scrolls when the user rolls the mouse wheel.
Parameters:
Name |
Type |
Description |
value |
number
|
A value that specifies the amount the calendar scrolls when the user rolls the mouse wheel. |
Example
0 {number}, locks any action the mouse's wheel performs
1 {number}, advances one month back or forward once the user rotates the mouse wheel
SetWheelChange
SetYearAlign(value)
The SetYearAlign() method aligns the year's label, while the control displays the year-view.
Parameters:
Name |
Type |
Description |
value |
exontrol.DrawTextFormatEnum
|
A exontrol.DrawTextFormatEnum value that aligns the year's label, while the control displays the year-view.
The exontrol.DrawTextFormatEnum type support the following flags:
- exTextAlignTop (0x00), justifies the text to the top of the rectangle
- exTextAlignLeft (0x00), aligns text to the left
- exTextAlignCenter (0x01), centers text horizontally in the rectangle
- exTextAlignRight (0x02), aligns text to the right
- exTextAlignVCenter (0x04), centers text vertically
- exTextAlignBottom (0x08), justifies the text to the bottom of the rectangle.
- exTextAlignMask (0x0F), specifies the mask for text's alignment.
- exTextWordBreak (0x10), breaks words. Lines are automatically broken between words if a word would extend past the edge of the rectangle specified by the lpRect parameter. A carriage return-line feed sequence also breaks the line. If this is not specified, output is on one line.
- exTextSingleLine (0x20), displays text on a single line only. Carriage returns and line feeds do not break the line.
- exTextExpandTabs (0x40), expands tab characters. The default number of characters per tab is eight.
- exPlainText (0x80), treats the text as plain text.
- exTextNoClip (0x0100), draws without clipping.
- exHTMLTextNoColors (0x0200), ignores the and tags.
- exTextCalcRect (0x0400), determines the width and height of the text.
- exHTMLTextNoTags (0x0800), ignores all HTML tags.
- exTextPathEllipsis (0x4000), for displayed text, replaces characters in the middle of the string with ellipses so that the result fits in the specified rectangle. If the string contains backslash (\) characters, exTextPathEllipsis preserves as much as possible of the text after the last backslash.
- exTextEndEllipsis (0x8000), for displayed text, if the end of a string does not fit in the rectangle, it is truncated and ellipses are added. If a word that is not at the end of the string goes beyond the limits of the rectangle, it is truncated without ellipses.
- exTextWordEllipsis (0x040000), truncates any word that does not fit in the rectangle and adds ellipses.
|
Example
null {null}, centers the label
32 or exontrol.DrawTextFormatEnum.exTextSingleLine {number}, defines a single-line label
0x2A or exontrol.DrawTextFormatEnum.exTextSingleLine | exontrol.DrawTextFormatEnum.exTextAlignRight | exontrol.DrawTextFormatEnum.exTextAlignBottom {number}, defines a single-line label right/bottom-aligned
SetYearAlign
SetYearLabel(value)
The SetYearLabel() method changes the ex-HTML string that can include expression fields (<%...%>) to display the year while the control displays the month-view or year-view.
Parameters:
Name |
Type |
Description |
value |
string
|
A string value that indicates a HTML string that can include expression fields (<%...%>) to display the year while the control displays the month-view or year-view.
The yearLabel property can include any of the following fields:
- "<%d%>", day of the month in one or two numeric digits, as needed (1 to 31)
- "<%dd%>", day of the month in two numeric digits (01 to 31)
- "<%d1%>", first letter of the weekday (S to S)"
- "<%loc_d1%>", indicates day of week as a one-letter abbreviation using the current user settings
- "<%d2%>", first two letters of the weekday (Su to Sa)
- "<%loc_d2%>", indicates day of week as a two-letters abbreviation using the current user settings
- "<%d3%>", first three letters of the weekday (Sun to Sat)
- "<%loc_d3%>", equivalent with "<%loc_ddd%>"
- "<%ddd%>", first three letters of the weekday (Sun to Sat)
- "<%loc_ddd%>", indicates the day of week as a three-letter abbreviation using the current user regional and language settings
- "<%dddd%>", full name of the weekday (Sunday to Saturday)
- "<%loc_dddd%>", indicates day of week as its full name using the current user regional and language settings
- "<%i%>", displays the number instead the date
- "<%w%>", day of the week (1 to 7)
- "<%ww%>", week of the year (1 to 53)
- "<%m%>", month of the year in one or two numeric digits, as needed (1 to 12)
- "<%mr%>", month of the year in Roman numerals, as needed (I to XII)
- "<%mm%>", month of the year in two numeric digits (01 to 12)
- "<%m1%>", first letter of the month (J to D)
- "<%loc_m1%>", indicates month as a one-letter abbreviation using the current user settings
- "<%m2%>", first two letters of the month (Ja to De)
- "<%loc_m2%>", indicates month as a two-letters abbreviation using the current user settings
- "<%m3%>", first three letters of the month (Jan to Dec)
- "<%loc_m3%>", equivalent with "<%loc_mmm%>"
- "<%mmm%>", first three letters of the month (Jan to Dec)
- "<%loc_mmm%>", indicates month as a three-letter abbreviation using the current user regional and language settings
- "<%mmmm%>", full name of the month (January to December)
- "<%loc_mmmm%>", indicates month as its full name using the current user regional and language settings
- "<%q%>", Date displayed as the quarter of the year (1 to 4)
- "<%y%>", number of the day of the year (1 to 366)
- "<%yy%>", last two digits of the year (01 to 99)
- "<%yyyy%>", full year (0100 to 9999)
- "<%hy%>", date displayed as the half of the year (1 to 2)
- "<%loc_g%>", indicates period/era using the current user regional and language settings
- "<%loc_gg%>", indicates period/era using the current user regional and language settings
- "<%loc_sdate%>", indicates the date in the short format using the current user regional and language settings
- "<%loc_ldate%>", indicates the date in the long format using the current user regional and language settings
- "<%loc_dsep%>", indicates the date separator using the current user regional and language settings (/)
- "<%h%>", hour in one or two digits, as needed (0 to 23)
- "<%hh%>", hour in two digits (00 to 23)
- "<%h12%>", hour in 12-hour time format, in one or two digits - [0(12),11]
- "<%hh12%>", hour in 12-hour time format, in two digits - [00(12),11]
- "<%n%>", minute in one or two digits, as needed (0 to 59)
- "<%nn%>", minute in two digits (00 to 59)
- "<%s%>", second in one or two digits, as needed (0 to 59)
- "<%ss%>", second in two digits (00 to 59)
- "<%AM/PM%>", twelve-hour clock with the uppercase letters "AM" or "PM", as appropriate
- "<%loc_AM/PM%>", indicates the time marker such as AM or PM using the current user regional and language settings
- "<%loc_A/P%>", indicates the one character time marker such as A or P using the current user regional and language settings
- "<%loc_time%>", indicates the time using the current user regional and language settings
- "<%loc_time24%>", indicates the time in 24 hours format without a time marker using the current user regional and language settings
- "<%loc_tsep%>", indicates the time separator using the current user regional and language settings (:)
- "<%loc_y%>", represents the Year only by the last digit, using current regional settings
- "<%loc_yy%>", represents the Year only by the last two digits, using current regional settings. A leading zero is added for single-digit years.
- "<%loc_yyyy%>", represents the Year by a full four or five digits, depending on the calendar used. Thai Buddhist and Korean calendars have five-digit years. The "yyyy" pattern shows five digits for these two calendars, and four digits for all other supported calendars. Calendars that have single-digit or two-digit years, such as for the Japanese Emperor era, are represented differently. A single-digit year is represented with a leading zero, for example, "03". A two-digit year is represented with two digits, for example, "13". No additional leading zeros are displayed
Also, dayWeekLabel property supports ex-HTML tags as follows:
- "<b>text</b>", displays the text in bold.
- "<li>text</li>", displays the text in italics.
- "<u>text</u>", underlines the text.
- "<s>text</s>", strike-through text
- "<a [id][;options]>text</a>", displays an anchor element that can be clicked
- "<font [family][;size]>text</font>", displays portions of text with a different font and/or different size.
- "<fgcolor color>text</fgcolor>", displays text with a specified foreground color.
- "<bgcolor color>text</bgcolor>", displays text with a specified background color.
- "<br>", defines a forced line-break
- "<r>", right aligns the text
- "<c>", centers the text
- "<img>key[:width]</img>", displays a custom-sized picture into the text. The key defines the name of the picture/image to be shown. The image can be added using the exontrol.HTMLPicture.Add() method.
- & glyph characters as "&" ( & ), "<" ( < ), ">" ( > ), "&qout;" ( quote character ) and "&#number;" ( the character with specified code ). For instance, "€" displays the EURO sign
- "<off offset>text</off>", defines the vertical offset to display the text.
- "<gra color[;mode[;blend]]>text</gra>", shows the text in gradient
- "<out color[;width]>text</out>", shows the text with outlined characters
- "<sha color[;width[;offset]]>text</sha>", shows the text with a shadow
|
Example
"" {string}, displays nothing
"<%yyyy%>" {string}, displays the year with four digits
SetYearLabel
SetYearRangeAlign(value)
The SetYearRangeAlign() method aligns the label that shows the range of years, while the control displays the month-view.
Parameters:
Name |
Type |
Description |
value |
exontrol.DrawTextFormatEnum
|
A exontrol.DrawTextFormatEnum value that aligns the label that shows the range of years, while the control displays the month-view.
The exontrol.DrawTextFormatEnum type support the following flags:
- exTextAlignTop (0x00), justifies the text to the top of the rectangle
- exTextAlignLeft (0x00), aligns text to the left
- exTextAlignCenter (0x01), centers text horizontally in the rectangle
- exTextAlignRight (0x02), aligns text to the right
- exTextAlignVCenter (0x04), centers text vertically
- exTextAlignBottom (0x08), justifies the text to the bottom of the rectangle.
- exTextAlignMask (0x0F), specifies the mask for text's alignment.
- exTextWordBreak (0x10), breaks words. Lines are automatically broken between words if a word would extend past the edge of the rectangle specified by the lpRect parameter. A carriage return-line feed sequence also breaks the line. If this is not specified, output is on one line.
- exTextSingleLine (0x20), displays text on a single line only. Carriage returns and line feeds do not break the line.
- exTextExpandTabs (0x40), expands tab characters. The default number of characters per tab is eight.
- exPlainText (0x80), treats the text as plain text.
- exTextNoClip (0x0100), draws without clipping.
- exHTMLTextNoColors (0x0200), ignores the and tags.
- exTextCalcRect (0x0400), determines the width and height of the text.
- exHTMLTextNoTags (0x0800), ignores all HTML tags.
- exTextPathEllipsis (0x4000), for displayed text, replaces characters in the middle of the string with ellipses so that the result fits in the specified rectangle. If the string contains backslash (\) characters, exTextPathEllipsis preserves as much as possible of the text after the last backslash.
- exTextEndEllipsis (0x8000), for displayed text, if the end of a string does not fit in the rectangle, it is truncated and ellipses are added. If a word that is not at the end of the string goes beyond the limits of the rectangle, it is truncated without ellipses.
- exTextWordEllipsis (0x040000), truncates any word that does not fit in the rectangle and adds ellipses.
|
Example
null {null}, centers the label
32 or exontrol.DrawTextFormatEnum.exTextSingleLine {number}, defines a single-line label
0x2A or exontrol.DrawTextFormatEnum.exTextSingleLine | exontrol.DrawTextFormatEnum.exTextAlignRight | exontrol.DrawTextFormatEnum.exTextAlignBottom {number}, defines a single-line label right/bottom-aligned
SetYearRangeAlign
Shuffle(ratio)
The Shuffle() method arranges randomly all elements within the control.
Parameters:
Name |
Type |
Description |
ratio |
number
|
specifies how far each element is randomized relative to the current size of the layout. For instance, 0 indicates that the element is not moved/shuffled, while 1, indicates that the element can randomize its position up to one width/height. |
Shuffle
Unshuffle()
The Unshuffle() method restores the elements of the control in case they were shuffled.
Unshuffle
Update(callback, thisArgopt)
The Update() method locks the control's paint during the callback, and invalidates the control once the method ends.
Parameters:
Name |
Type |
Attributes |
Description |
callback |
callback
|
|
Indicates a callback to perform changes within the control |
thisArg |
any
|
<optional>
|
Specifies the value of "this" keyword during the callback. If missing/empty/undefined the thisArg points to the control itself, as an object of Calendar type |
Update
drawO(ctx, rtObject, oShape, oShapeData, oHTObject)
The drawO/drawObject() method draws an object of the calendar control
Parameters:
Name |
Type |
Description |
ctx |
CanvasRenderingContext2D
|
the canvas's context where drawing occurs |
rtObject |
Array.<number>
|
Indicates the object's client-rectangle |
oShape |
S
|
A shape to apply on the object's background |
oShapeData |
object
|
Indicates an object of {text,formatText,ht} type that holds information about the object to display |
oHTObject |
object
|
Specifies an object of {type,date} type that specifies the encoded object |
- Since:
drawO
(static) Collect(from, to, A) → {array}
The Collect() method collects dates between a specified interval, of all week, month and so on. For instance, you can get all days of a specified week.
Parameters:
Name |
Type |
Description |
from |
number
|
string
|
date
|
A value of one of the following types:
- {string}, defines the date in string-format as "#MM/DD/YYYY[ HH:mm:ss]#"
- {Date}, indicates a JavaScript date to be copied
- {number} integer value representing the year of the date to be created
- {null} or {undefined}, indicates the current date and time (equivalent of Now)
that defines the date the method starts collects date from |
to |
number
|
string
|
date
|
A value of one of the following types:
- {string}, defines the date in string-format as "#MM/DD/YYYY[ HH:mm:ss]#"
- {Date}, indicates a JavaScript date to be copied
- {number} integer value representing the year of the date to be created
- {null} or {undefined}, indicates the current date and time (equivalent of Now)
that defines the date the method ends collects date to |
A |
Calendar.CollectEnum
|
Calendar.CollectEnum expression that specifies how to collect dates. |
Returns:
Returns an array of [Date] type that contains the collected dates.
-
Type
-
array
Example
For instance:
console.log(Calendar.Collect( Date.Create(2018,1,1), null, Calendar.CollectEnum.exWeek ));
returns 6 week-days as: Array(6) [Mon, 01 Jan 2018 00:00:00 GMT, Tue, 02 Jan 2018 00:00:00 GMT, Wed, 03 Jan 2018 00:00:00 GMT, Thu, 04 Jan 2018 00:00:00 GMT, Fri, 05 Jan 2018 00:00:00 GMT, Sat, 06 Jan 2018 00:00:00 GMT]
while:
console.log(Calendar.Collect( Date.Create(2018,1,1), null, Calendar.CollectEnum.exWeekAll ))
returns 7 week-days as: Array(7) [Sun, 31 Dec 2017 00:00:00 GMT, Mon, 01 Jan 2018 00:00:00 GMT, Tue, 02 Jan 2018 00:00:00 GMT, Wed, 03 Jan 2018 00:00:00 GMT, Thu, 04 Jan 2018 00:00:00 GMT, Fri, 05 Jan 2018 00:00:00 GMT, Sat, 06 Jan 2018 00:00:00 GMT]
Collect
Events
onanchorclick
The onanchorclick() event occurs once the user clicks an anchor element (the <a id;options> ex-HTML part marks an anchor or hyperlink element)
Parameters:
Name |
Type |
Description |
oEvent |
object
|
Holds information about anchor being clicked
Properties
Name |
Type |
Description |
id |
string
|
specifies null (no identifier has been specified for the anchor) or the anchor's identifier |
options |
string
|
specifies null (no options has been specified for the anchor) or the anchor's options |
|
- Since:
Example
The following samples display information about the element being clicked:
oCalendar.Listeners.Add("onanchorclick", function (oEvent)
{
console.log(oEvent);
})
or
oCalendar.onanchorclick = function (oEvent)
{
console.log(oEvent);
}
where oCalendar is an object of Calendar type.
onanchorclick
onclick
The onclick() method occurs once the user clicks or double-clicks the view.
Parameters:
Name |
Type |
Description |
oEvent |
object
|
specifies an object of {dblClick,button,modifiers,..} type, that holds information about the object being clicked
Properties
Name |
Type |
Description |
type |
string
|
specifies the type of the part being clicked |
date |
Date
|
specifies the date being clicked |
events |
array
|
holds the event being clicked, as an array of [exontrol.Calendar.Event] type |
dblClick |
boolean
|
indicates whether the user clicks or double-clicks the event |
button |
number
|
indicates which button is pressed while clicking the event as 1 (left), 2 (right) or 4 (middle) |
modifiers |
number
|
specifies a combination of 1, 2, 4 and 16 according with modifier keys (ALT, CTRL, META and SHIFT), or 0 if no modifier keys |
|
- Since:
Example
The following samples display information about the event being clicked:
oCalendar.Listeners.Add("onclick", function (oEvent)
{
console.log(oEvent);
})
or
oCalendar.onclick = function (oEvent)
{
console.log(oEvent);
}
where oCalendar is an object of Calendar type.
onclick
ondatechange
The ondatechange() method notifies your application once the control's date has been changed
Parameters:
Name |
Type |
Description |
oEvent |
Date
|
Specifies the newly date that the control displays. The control's GetDate() method returns the same value. |
Example
The following samples display the control's date once it changes:
oCalendar.ondatechange = function (oEvent)
{
console.log(oEvent);
}
or
oCalendar.Listeners.Add("ondatechange", function (oEvent)
{
console.log(oEvent);
})
where oCalendar is an object of Calendar type
ondatechange
onselchange
The onselchange() method occurs once the control's selection has been changed
Parameters:
Name |
Type |
Description |
oEvent |
null
|
Date
|
Array.<Date>
|
Holds the control's selection as:
- {null}, indicates that the control has no selected dates
- {Date}, indicates an object of Date type that defines the control's single-date selected
- {Date[]}, specifies an array of [Date] type that holds all selected dates within the control
|
Example
The following samples display the control's selection once it changed:
oCalendar.onselchange = function (oEvent)
{
console.log(oEvent);
}
or
oCalendar.Listeners.Add("onselchange", function (oEvent)
{
console.log(oEvent);
})
where oCalendar is an object of Calendar type
onselchange
onselchanging
The onselchanging() method occurs once the control's selection is about to change
Parameters:
Name |
Type |
Description |
oEvent |
null
|
Date
|
Array.<Date>
|
Holds the control's selection as:
- {null}, indicates that the control has no selected dates
- {Date}, indicates an object of Date type that defines the control's single-date selected
- {Date[]}, specifies an array of [Date] type that holds all selected dates within the control
|
Example
The following samples display the control's selection before it changes:
oCalendar.onselchanging = function (oEvent)
{
console.log(oEvent);
}
or
oCalendar.Listeners.Add("onselchanging", function (oEvent)
{
console.log(oEvent);
})
where oCalendar is an object of Calendar type
onselchanging