Skip to content

nylas-timeslot-picker

The nylas-timeslot-picker element allows users to select a time slot from a list of available time slots.

Namehour12
DescriptionThe 12-hour time format.
Typeboolean | undefined
NameselectedDate
DescriptionThe selected date.
TypeDate | undefined
NameselectedLanguage
DescriptionThe selected 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
NameselectedTimeslot
DescriptionThe selected time slot.
Typeundefined | { start_time: Date; end_time: Date; emails?: string[] | undefined; capacity?:
number | undefined; event_id?: string | undefined; master_id?: string | undefined;
calendar_id?: string | undefined; }
NameselectedTimezone
DescriptionThe selected time zone.
Typestring

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

Nameavailability
DescriptionThe available time slots.
TypeAvailabilityTimeslot[] | undefined
NameisLoading
DescriptionThe loading state prop. Used to display loading state when fetching availability.
Typeboolean | undefined
NamethemeConfig
DescriptionThe theme configuration.
Typeany
EventDescription
timeslotConfirmedFired when a time slot is confirmed. By default, this will proceed to the booking form page.
timeslotSelectedFired when a time slot is selected.
validateTimeslotError
MethodParametersType returned
emitValidateTimeslotError(error: string, type: 'error' | 'info')
=> Promise<void>
error (string)
type (error | info)
Promise<void>
SlotDescription
timeslot-picker-cta-labelThe label for the time slot picker CTA. Default is “Next”.
PartDescription
ntpThe time slot picker component.
ntp__button-primaryThe time slot picker CTA.
ntp__time-label
ntp__time-picker-wrapperThe time slot picker wrapper.
ntp__timeslotThe time slot button.
ntp__timeslot--selectedThe selected time slot button.
ntp__timeslotsThe time slot picker time slots.

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