setConfirmHandler()
Description
Registers a handler for the confirm-slot event
Usage
setConfirmHandler(confirmHandler: (ev) => any): void;
Parameters
The method takes the confirmHandler function that will be called when confirming a slot for booking. The function takes the object as in the confirm-slot event.
Example
const { data } = getData();
const widget = new booking.Booking("#root", {
data
});
widget.setConfirmHandler((ev) => {
console.log("Booking info:", ev);
});
Related articles: Saving reservations to the server