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

    Interface AppointmentPickerApiAction

    Provides functions related to performing actions on an appointment picker, such as selecting a different slot, opening / closing the picker, or loading available slots.

    Available via $.xutil.appointmentPicker.do.

    interface AppointmentPickerApiAction {
        changeDisplay: (
            picker: AppointmentPickerInstanceReference,
            mode?: ChangeDisplayMode,
        ) => void;
        changeLock: (
            picker: AppointmentPickerInstanceReference,
            mode: ChangeLockMode,
        ) => void;
        changeMonthYear: (
            picker: AppointmentPickerInstanceReference,
            monthYear: LocalMonthYear,
        ) => void;
        changeMonthYearToNow: (picker: AppointmentPickerInstanceReference) => void;
        changeOptions: (
            picker: AppointmentPickerInstanceReference,
            options: Partial<AppointmentPickerOptions>,
        ) => void;
        clearDisabledDates: (picker: AppointmentPickerInstanceReference) => void;
        disableDateRanges: (
            picker: AppointmentPickerInstanceReference,
            ...ranges: readonly LocalDateRange[],
        ) => void;
        disableDates: (
            picker: AppointmentPickerInstanceReference,
            ...dates: readonly LocalDate[],
        ) => void;
        disableDatesAfter: (
            picker: AppointmentPickerInstanceReference,
            maxDate: LocalDate,
        ) => void;
        disableDatesBefore: (
            picker: AppointmentPickerInstanceReference,
            minDate: LocalDate,
        ) => void;
        enableDateRanges: (
            picker: AppointmentPickerInstanceReference,
            ...ranges: readonly LocalDateRange[],
        ) => void;
        enableDates: (
            picker: AppointmentPickerInstanceReference,
            ...dates: readonly LocalDate[],
        ) => void;
        enableDatesAfter: (
            picker: AppointmentPickerInstanceReference,
            maxDate: LocalDate,
        ) => void;
        enableDatesBefore: (
            picker: AppointmentPickerInstanceReference,
            minDate: LocalDate,
        ) => void;
        loadAvailableSlots: (
            picker: AppointmentPickerInstanceReference,
            monthYear: LocalMonthYear,
        ) => Promise<AppointmentMonthSlotData>;
        moveMonthYearBy: (
            picker: AppointmentPickerInstanceReference,
            monthYearDuration: Partial<LocalMonthYearDuration>,
        ) => void;
        selectDate: (
            picker: AppointmentPickerInstanceReference,
            date: LocalDate,
            options?: AppointmentPickerSetDateOptions,
        ) => void;
        selectSlot: (
            picker: AppointmentPickerInstanceReference,
            slot: AppointmentSlot,
            options?: AppointmentPickerSetSlotOptions,
        ) => void;
        setPersistedAppointment: (
            picker: AppointmentPickerInstanceReference,
            appointment: AppointmentPickerPersistedAppointment,
        ) => void;
    }
    Index

    Properties

    changeDisplay: (
        picker: AppointmentPickerInstanceReference,
        mode?: ChangeDisplayMode,
    ) => void

    Closes or opens the appointment picker, for all appointment pickers from the given reference.

    Closing the picker requires that it is closable. Otherwise, no action is performed.

    Type declaration

    changeLock: (
        picker: AppointmentPickerInstanceReference,
        mode: ChangeLockMode,
    ) => void

    Changes the lock state of the appointment picker, for all pickers from the given reference.

    When the picker is enabled, it can be edited by the user. When it is disabled or read-only, it cannot be edited by the user anymore, but its value can still be changed via scripting.

    Appointment pickers that are disabled or read-only are always closed and cannot be opened.

    Type declaration

    changeMonthYear: (
        picker: AppointmentPickerInstanceReference,
        monthYear: LocalMonthYear,
    ) => void

    Shows a particular month in a given year and shows all days for the month, for all appointment pickers from the given reference.

    Type declaration

    changeMonthYearToNow: (picker: AppointmentPickerInstanceReference) => void

    Selects the current month of the current year and shows all days for the month, for all appointment pickers from the given reference.

    Type declaration

    changeOptions: (
        picker: AppointmentPickerInstanceReference,
        options: Partial<AppointmentPickerOptions>,
    ) => void

    Sets the options all appointment picker from the given reference,

    Type declaration

    clearDisabledDates: (picker: AppointmentPickerInstanceReference) => void

    Removes all disabled dates, so that no more dates are disabled, for all appointment pickers 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

    disableDateRanges: (
        picker: AppointmentPickerInstanceReference,
        ...ranges: readonly LocalDateRange[],
    ) => void

    Adds a list of date ranges to the list of disabled date ranges, for all appointment pickers from the given reference.

    These dates are additive. You can add multiple ranges of disabled dates.

    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

    disableDates: (
        picker: AppointmentPickerInstanceReference,
        ...dates: readonly LocalDate[],
    ) => void

    Disables the given dates, for all appointment pickers from the given reference.

    These dates are additive. You can add multiple disabled dates.

    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

    disableDatesAfter: (
        picker: AppointmentPickerInstanceReference,
        maxDate: LocalDate,
    ) => void

    Disables all dates after the given date, for al first appointment pickers 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

    disableDatesBefore: (
        picker: AppointmentPickerInstanceReference,
        minDate: LocalDate,
    ) => void

    Disables all dates before the given date, for al first appointment pickers 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

    enableDateRanges: (
        picker: AppointmentPickerInstanceReference,
        ...ranges: readonly LocalDateRange[],
    ) => void

    Removes a list of date ranges from the list of disabled date ranges, for all appointment pickers 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

    enableDates: (
        picker: AppointmentPickerInstanceReference,
        ...dates: readonly LocalDate[],
    ) => void

    Enables the given dates, for all appointment pickers 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

    enableDatesAfter: (
        picker: AppointmentPickerInstanceReference,
        maxDate: LocalDate,
    ) => void

    Enables all dates after the given date, for al first appointment pickers 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

    enableDatesBefore: (
        picker: AppointmentPickerInstanceReference,
        minDate: LocalDate,
    ) => void

    Enables all dates before the given date, for al first appointment pickers 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

    loadAvailableSlots: (
        picker: AppointmentPickerInstanceReference,
        monthYear: LocalMonthYear,
    ) => Promise<AppointmentMonthSlotData>

    Loads the available slots of a given month year, for the first appointment picker from the given reference.

    Type declaration

    moveMonthYearBy: (
        picker: AppointmentPickerInstanceReference,
        monthYearDuration: Partial<LocalMonthYearDuration>,
    ) => void

    Changes the month and year of the calendar by the given amount, for all appointment pickers from the given reference.

    Type declaration

    selectDate: (
        picker: AppointmentPickerInstanceReference,
        date: LocalDate,
        options?: AppointmentPickerSetDateOptions,
    ) => void

    Selects a particular day and shows the available slots of that day, for all appointment pickers from the given reference.

    Type declaration

    selectSlot: (
        picker: AppointmentPickerInstanceReference,
        slot: AppointmentSlot,
        options?: AppointmentPickerSetSlotOptions,
    ) => void

    Changes the currently selected slot to the given slot or clears the selected slot, for all appointment pickers from the given reference.

    Type declaration

    setPersistedAppointment: (
        picker: AppointmentPickerInstanceReference,
        appointment: AppointmentPickerPersistedAppointment,
    ) => void

    Sets the persisted appointment, for all appointment pickers 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