Interface AppointmentPickerApiSnapshot

(advanced) Provides functions related to snapshots. A snapshot is a frozen view of an appointment picker's state at a particular moment in time. After taking a snapshot, the picker's state can be restored to that snapshot at a later point in time.

Available via $.xutil.appointmentPicker.snapshot.

Hierarchy

  • AppointmentPickerApiSnapshot

Index

Properties

discard

discard: function

Advanced usage Do not use this method if you do not understand it.

Discards a snapshot that was created by a call to take. Afterwards, the snapshot cannot be restored anymore.

Type declaration

    • (snapshotToken: string): void
    • Parameters

      • snapshotToken: string

      Returns void

restore

restore: function

Advanced usage Do not use this method if you do not understand it.

Restores the state of all appointment pickers to the given state, identified by its snapshot token. This must be a token as returned by take.

param

A reference to the appointment pickers for which to restore the snapshot.

param

A token of an existing snapshot to restore.

param

Optional settings for how to restore the snapshot.

Type declaration

setPersistedAppointment

setPersistedAppointment: function

Derives a new snapshot by setting the persisted appointment.

Each picker may be associated with an appointment that was booked on the server, usually previously when the form was first submitted. Normally selected slots that do not correspond to an available slot are treated as invalid. When a selected slot correspond to the persisted slot, that selection is always allowed. that corresponds to this persisted appointment

The returned snapshot token may be identical to the given snapshot token if the request did not result in any actual modifications.

If the given snapshot token refers to a non-existing snapshot, the given token is returned as-is.

param

A token of an existing snapshot from which to derive a new snapshot.

param

The new persisted appointment to set, undefined to clear it.

returns

A snapshot token identifying the new snapshot.

see

take

Type declaration

setSlot

setSlot: function

Advanced usage Do not use this method if you do not understand it.

Derives a new snapshot from an existing snapshot by changing the selected slot to the new given slot. The provided snapshot token must be one of the tokens as created by take.

The returned snapshot token may be identical to the given snapshot token if the request did not result in any actual modifications.

If the given snapshot token refers to a non-existing snapshot, the given token is returned as-is.

param

A token of an existing snapshot from which to derive a new snapshot.

param

A slot to select, or undefined to clear the selected slot.

param

Optional settings for how the slot is selected.

returns

A snapshot token identifying the new snapshot.

see

take

Type declaration

take

take: function

Advanced usage Do not use this method if you do not understand it.

Creates a snapshot of the first appointment picker from the given reference and returns a token that can then later be used with restore to restore the appointment picker to the exact same state.

The returned token is valid only for the duration of the global window scope.

param

A reference to the appointment picker for which to create the snapshot.

returns

A token of the created snapshot that can be passed to restore.

Type declaration