formcycle 8.4.0 - 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: any) => AppointmentTemplate;
        appointmentType: (picker: any) => AppointmentType;
        date: (picker: any) => LocalDate;
        disabledDates: (picker: any) => readonly LocalDateRange[];
        isDateDisabled: (picker: any, date: LocalDate) => boolean;
        isLocked: (picker: any) => boolean;
        isOpened: (picker: any) => boolean;
        lock: (picker: any) => AppointmentPickerLockState;
        monthYear: (picker: any) => LocalMonthYear;
        options: (picker: any) => AppointmentPickerOptions;
        persistedAppointment: (
            picker: any,
        ) => AppointmentPickerPersistedAppointment;
        slot: (picker: any) => AppointmentSlot;
        slotStartDate: (picker: any) => Date;
    }
    Index

    Properties

    appointmentTemplate: (picker: any) => 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

      • (picker: any): AppointmentTemplate
      • Parameters

        • picker: any

          A reference to the appointment picker from which to read the type UUID.

        Returns AppointmentTemplate

        The picker's appointment type UUID.

    appointmentType: (picker: any) => 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

      • (picker: any): AppointmentType
      • Parameters

        • picker: any

          A reference to the appointment picker from which to read the type UUID.

        Returns AppointmentType

        The picker's appointment type UUID.

    date: (picker: any) => LocalDate

    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

      • (picker: any): LocalDate
      • Parameters

        • picker: any

          A reference to the appointment picker from which to get the selected date.

        Returns LocalDate

        The currently selected date, or undefined when no date is selected.

    disabledDates: (picker: any) => 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

      • (picker: any): readonly LocalDateRange[]
      • Parameters

        • picker: any

          A reference to the appointment picker to process.

        Returns readonly LocalDateRange[]

        A list of disabled dates.

    isDateDisabled: (picker: any, 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

      • (picker: any, date: LocalDate): boolean
      • Parameters

        • picker: any

          A reference to the appointment picker to process.

        • date: LocalDate

          A date to check.

        Returns boolean

        Whether the given date is disabled.

    isLocked: (picker: any) => 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

      • (picker: any): boolean
      • Parameters

        • picker: any

          A reference to the appointment picker for which to check whether it is locked.

        Returns boolean

        true when the picker is locked, or false otherwise.

    isOpened: (picker: any) => 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

      • (picker: any): boolean
      • Parameters

        • picker: any

          A reference to the appointment picker for which to check whether it is open.

        Returns boolean

        true when the picker is open, or false otherwise. Always returns true when the picker is not closable.

    lock: (picker: any) => AppointmentPickerLockState

    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

    monthYear: (picker: any) => LocalMonthYear

    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

      • (picker: any): LocalMonthYear
      • Parameters

        • picker: any

          A reference to the appointment picker from which to get the currently viewed month.

        Returns LocalMonthYear

        The currently viewed month and year, or the current month and year when the reference does not solve to any appointment pickers.

    options: (picker: any) => AppointmentPickerOptions

    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

    persistedAppointment: (picker: any) => AppointmentPickerPersistedAppointment

    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

    slot: (picker: any) => AppointmentSlot

    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

      • (picker: any): AppointmentSlot
      • Parameters

        • picker: any

          A reference to the appointment picker from which to get the selected slot.

        Returns AppointmentSlot

        The currently selected slot, or undefined when no slot is selected.

    slotStartDate: (picker: any) => 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

      • (picker: any): Date
      • Parameters

        • picker: any

          A reference to the appointment picker from which to get the selected slot.

        Returns Date

        The start date of the currently selected slot, or undefined when no slot is selected.