useSelectedTimeSlot
Holds the time slot the visitor picked. book, reserve and reschedule read it; the Vue component emits time-slot-changed when it changes.
ts
import { useSelectedTimeSlot } from "@zaptime/core";
const { selectedTimeSlot, setSelectedTimeSlot } = useSelectedTimeSlot(calendarId?);Selected time slot
ts
selectedTimeSlot.value; // TimeSlot | undefinedSet selected time slot
ts
setSelectedTimeSlot(timeSlot);
setSelectedTimeSlot(undefined); // clear, e.g. when leaving the booking formuseCalendar().selectTimeSlot(slot) is the same operation.
