Skip to main content

setConfirmHandler()

Description

Allows setting the handler for confirming slots

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 booking = new booking.Booking("#root", {
data
});

booking.setConfirmHandler((ev) => {
console.log("Booking info:", ev);
});

Related articles: Saving slots reservations to the server