Interface AppointmentPickerApiLifecycle

(advanced) Provides functions related to the lifecycle of an appointment picker, such as initializing a new picker on a DOM element, getting the ID of an existing picker, or destroying an existing picker.

Hierarchy

  • AppointmentPickerApiLifecycle

Index

Properties

destroy

destroy: function

Destroys the given appointment pickers.

param

A reference to the appointment pickers to destroy.

Type declaration

getInstanceId

getInstanceId: function

Finds the instance IDs of the first appointment picker from the given reference.

param

A reference to the appointment picker to process.

returns

The instance IDs of the first appointment picker, or undefined when the given reference does not resolve to any appointment pickers.

Type declaration

getInstanceIds

getInstanceIds: function

Finds all instance IDs of the appointment picker for the given reference.

When the reference resolves to multiple appointment pickers, the IDs are returned in the order of the given references.

param

A reference to the appointment picker to process.

returns

All instance IDs of the given appointment pickers.

Type declaration

hasAnyActivePicker

hasAnyActivePicker: function

Checks whether the given reference represents an existing appointment picker.

param

A reference to the appointment picker to check.

returns

true when the given reference represents at least one active appointment picker, false otherwise.

Type declaration

initialize

initialize: function

Initializes an element as an appointment picker and displays it.

Creates a new picker instance and attaches the given element as a view for that picker.

The initial settings for the appointment picker are read from various sources, such as the current environment (the current time), the default settings of the JQueryUI datepicker (date format), the I18N variables (localized messages), the XFC metadata (session ID and AJAX endpoint URLs); as well as from the given DOM element (data provided by the server, such as whether the picker is closable).

The given options always take precedence over all other option sources.

Returns the instance ID of the newly created picker. The ID is unique within the scope of a page's global window context. The ID can be given to the various methods offered by this module to perform operations on the appointment picker.

When an appointment picker was already initialized, does nothing and simply returns its ID.

param

A DOM element to convert to an appointment picker. Should be a container element such as a div.

param

Optional settings for the newly created appointment picker.

returns

The instance ID for each of the newly created pickers.

Type declaration