formcycle 8.3.6 - JavaScript for forms
    Preparing search index...

    Interface AppointmentPickerApiSelect

    Provides functions related to getting data from an appointment picker, such as the selected slot or whether the picker is opened / closed.

    Available via $.xutil.appointmentPicker.get.

    interface AppointmentPickerApiSelect {
        appointmentTemplate: (
            picker: AppointmentPickerStateReference,
        ) => AppointmentTemplate;
        appointmentType: (
            picker: AppointmentPickerStateReference,
        ) => AppointmentType;
        date: (picker: AppointmentPickerStateReference) => LocalDate;
        disabledDates: (
            picker: AppointmentPickerStateReference,
        ) => readonly LocalDateRange[];
        isDateDisabled: (
            picker: AppointmentPickerStateReference,
            date: LocalDate,
        ) => boolean;
        isLocked: (picker: AppointmentPickerStateReference) => boolean;
        isOpened: (picker: AppointmentPickerStateReference) => boolean;
        lock: (
            picker: AppointmentPickerStateReference,
        ) => AppointmentPickerLockState;
        monthYear: (picker: AppointmentPickerStateReference) => LocalMonthYear;
        options: (
            picker: AppointmentPickerStateReference,
        ) => AppointmentPickerOptions;
        persistedAppointment: (
            picker: AppointmentPickerStateReference,
        ) => AppointmentPickerPersistedAppointment;
        slot: (picker: AppointmentPickerStateReference) => AppointmentSlot;
        slotStartDate: (picker: AppointmentPickerStateReference) => Date;
    }
    Index

    Properties

    appointmentTemplate: (
        picker: AppointmentPickerStateReference,
    ) => AppointmentTemplate

    Finds the appointment template for first appointment picker from the given reference.

    Each appointment picker is associated with an appointment template that can be configured in the backend.

    Type declaration

    appointmentType: (picker: AppointmentPickerStateReference) => AppointmentType

    Finds the appointment template for first appointment picker from the given reference.

    Each appointment may have multiple appointment types. Each type defines a schedule when appointments can be booked.

    Type declaration

    Finds the currently selected date of the first appointment picker from the given reference.

    Returns undefined when the given picker instance reference does not resolve to any existing appointment picker instance.

    Type declaration

    disabledDates: (
        picker: AppointmentPickerStateReference,
    ) => readonly LocalDateRange[]

    Gets a list of all disabled date ranges, for the first appointment picker from the given reference.

    Disabled dates cannot be selected by the user. Note that dates without available slots are usually also displayed as disabled, but are not included in the result of this function.

    Type declaration

    isDateDisabled: (
        picker: AppointmentPickerStateReference,
        date: LocalDate,
    ) => boolean

    Checks whether the given date is disabled for the first appointment picker from the given reference.

    Disabled dates cannot be selected by the user. Note that dates without available slots are usually also displayed as disabled, but are not included in the result of this function.

    Type declaration

    isLocked: (picker: AppointmentPickerStateReference) => boolean

    Checks whether the appointment picker is locked, for the first appointment picker from the given reference.

    The picker is locked when it is disabled or read-only and cannot be edited.

    Returns false when the given picker instance reference does not resolve to any existing appointment picker instance.

    Type declaration

    isOpened: (picker: AppointmentPickerStateReference) => boolean

    Checks whether the appointment picker is opened or closed, for the first appointment picker from the given reference

    Returns false when the given picker instance reference does not resolve to any existing appointment picker instance.

    Type declaration

    Gets the lock state of the appointment picker, for the first appointment picker from the given reference.

    The picker is locked when it is disabled or read-only and cannot be edited.

    This is similar to isLocked, but contains info about whether the picker is disabled or read-only.

    Returns enabled when the given picker instance reference does not resolve to any existing appointment picker instance.

    Type declaration

    Finds the month currently viewed in the calendar for the first appointment picker from the given reference.

    Returns undefined when the given picker instance reference does not resolve to any existing appointment picker instance.

    Type declaration

    Gets the options of the first appointment picker from the given reference.

    Returns undefined when the given reference does not point to an existing appointment picker.

    Type declaration

    Gets the persisted appointment, if any, for the first appointment picker from the given reference.

    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

    Type declaration

    Retrieves the currently selected slot of the first appointment picker from the given reference.

    Returns undefined when the given picker instance reference does not resolve to any existing appointment picker instance.

    Type declaration

    slotStartDate: (picker: AppointmentPickerStateReference) => Date

    Retrieves the start date of the currently selected slot of the first appointment picker from the given reference. The result is returned as a JavaScript date object.

    Returns undefined when the given picker instance reference does not resolve to any existing appointment picker instance.

    Type declaration