confirm-slot
Description
Fires when confirming the booking of a slot
Usage
"confirm-slot": ({
cardId: string | number,
data: {
[key: string]: string,
},
startTime: number,
confirmation: promise,
}) => void;
Parameters
The callback of the confirm-slot event can take an object with the following parameters:
cardId
- (required) the ID of a card for which the booking of a slot is confirmeddata
- (required) an abject with the booking screen form fields with the following parameters for each field:key
- (required) the form field ID. By default, three fields are added: name, email, descriptionstartTime
- (required) the start time of a slot in milliseconds
confirmation
- (required) a promise with the confirmation status
Example
// create Booking
const booking = new booking.Booking("#root", {
cards,
cardShape
});
// ...
booking.api.on("confirm-slot", (obj) => {
console.log(obj.cardId);
});
Related articles: TODO