api.exec()
Description
Allows triggering the inner events
Usage
api.exec(
event: string,
config: object
): void;
Parameters
event
- (required) an event to be firedconfig
- (required) the config object with parameters (see the event to be fired)
Events
info
The full list of the Booking internal events can be found here
Example
The example below demonstrates how to apply filter at the initialization:
const booking = new booking.Booking("#root", {
data,
//other configuration parameters
});
booking.api.exec("filter-data", {
filterData: {
text: "Allergist",
date: {
start: new Date,
end: new Date(2025, 2, 12)
},
time: [
{
from: 12,
to: 20
}
]
}
});