Skip to main content

select-item-date

Description

Fires when an item is selected

Usage

"select-item-date": ({
id: string|number,
date: number
}) => void;

Parameters

The callback of the select-item-date event can take an object with the following parameters:

  • id - (required) the id of an item
  • date - (required) the date (in milliseconds) that was set for the selected item

Example

// create Booking
const booking = new booking.Booking("#root", {
data,
// other configuration parameters
});

// output the date
booking.api.on("select-item-date", (ev) => {
console.log(ev.date);
});