Skip to content

nylas-cancel-booking-form

The nylas-cancel-booking-form element allows users to cancel a booking (DELETE request). This component is also used to reject a booking (PUT request) by the organizer, if the prop rejectBookingId is provided.

NamecancelBookingId
DescriptionThe booking ID to cancel.
Typestring | undefined
NamerejectBookingId
DescriptionThe booking ID to reject.
Typestring | undefined
NameselectedTimeslot
DescriptionThe selected time slot.
Type{ start_time: Date; end_time: Date; emails?: string[] | undefined; capacity?: number |
undefined; event_id?: string | undefined; master_id?: string | undefined; calendar_id?: string
| undefined; }

The following props are automatically configured when used within NylasScheduling. Set these props manually only if you’re using the component independently.

NameconfigSettings
DescriptionThe Configuration settings.
Typeundefined | { configuration_id: string; booking?: { additional_fields: Record<string, string>;
additional_guests: { email: string; name: string; }[]; booking_ref: string; booking_ref_salt:
string; guest: { email: string; name: string; }; timezone: string; email_language: string;
event_data: { location: string; when: { start_time: Date; end_time: Date; end_timezone:
string; start_timezone: string; object: string; }; }; event_organizer: { name: string; email:
string; is_organizer: boolean; }; } | undefined; scheduler: { available_days_in_future:
number; min_cancellation_notice: number; min_booking_notice: number; rescheduling_url?:
string | undefined; cancellation_url?: string | undefined; cancellation_policy?: string
| undefined; hide_additional_guests?: boolean | undefined; hide_cancellation_options?:
boolean | undefined; hide_rescheduling_options?: boolean | undefined; additional_fields?:
Record<string, AdditionalFields> | undefined; confirmation_redirect_url?: string | undefined;
organizer_confirmation_url?: string | undefined; }; organizer: { name: string; email: string;
}; slug: string; appearance: Appearance; booking_type: string; name: string; }
NameeventInfo
DescriptionThe event information.
Typeundefined | { booking_id: string; organizer: { email: string; name: string; is_organizer?:
boolean | undefined; }; title: string; description: string; status: string; event_id: string;
location: string; booking_ref: string; }
NameisLoading
DescriptionThe loading state.
Typeboolean | undefined
NameselectedLanguage
DescriptionThe default language.
TypeLANGUAGE_CODE.de | LANGUAGE_CODE.en | LANGUAGE_CODE.es | LANGUAGE_CODE.fr | LANGUAGE_CODE.ja |
LANGUAGE_CODE.ko | LANGUAGE_CODE.nl | LANGUAGE_CODE.sv | LANGUAGE_CODE.zh | undefined
NamethemeConfig
DescriptionThe theme configuration.
Typeany
EventDescription
cancelBookedEventErrorFired when an error occurs while cancelling the booking.
cancelBookingFormErrorFired when an error occurs in the booking form.
cancelBookingFormSubmittedFired when the cancel booking form is submitted.
goBackButtonClickedFired when the Go back button is clicked on the cancel booking form.
triggerValidationThis event is for triggering the validation on the text area for cancellation reason. This is for internal purposes only.
PartDescription
ncbfThe cancel booking form container.
ncbf__button-ctaThe cancel booking form CTA button.
ncbf__button-outlineThe cancel booking form outline button.
ncbf__cardThe cancel booking form card.
ncbf__descriptionThe description of the cancel booking form.
ncbf__iconThe calendar icon.
ncbf__reason-textareaThe reason text area.
ncbf__titleThe title of the cancel booking form.

The nylas-cancel-booking-form element is automatically included in the main NylasScheduling component. The following code samples show how to use the element on its own.