getCalendar (Get calendar of a date field)

Prev Next

Reads the calendar of a Date/Time element and returns it as a copy.

Tooltip

Syntax: $getCalendar(elementId)

Parameter

Description

elementId

The ID of the date/time element

An object of the 'calendar' type or $null if there is no calendar or the specified field is not a date/time element.

Example: $getCalendar(5) – returns the calendar copy of the date element with the ID 5.

If the field with the specified element ID does not exist, is not a date field or has no calendar stored, an empty result ($null) is returned.

â–ºNOTEâ—„ If this function is called before the source field's calendar has been fully loaded, it will NOT wait for the calendar to be initialized. In this case the currently loaded calendar of the field will be returned.

Syntax

$getCalendar(elementId)

Parameter

Name

Description

elementId

The ID of the Date/Time element

Return value

An object of the 'calendar' type or $null if there is no calendar or the specified field is not a Date/Time element.

Example

Syntax

Result

$getCalendar( 5 )

The calendar copy of the date field with the element ID 5.