Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
ac0dda7
[update] rewrite configuration guide via article-guide skill
serhiipylypchuk1991 May 26, 2026
da1ab1f
[update] rewrite initialization guide via article-guide skill
serhiipylypchuk1991 May 26, 2026
452cced
[update] rewrite loading-data guide via article-guide skill
serhiipylypchuk1991 May 26, 2026
b8c464e
[update] rewrite localization guide via article-guide skill
serhiipylypchuk1991 May 26, 2026
0b8ad3e
[update] rewrite saving-reservations guide via article-guide skill
serhiipylypchuk1991 May 26, 2026
c460d64
[update] rewrite styling guide via article-guide skill
serhiipylypchuk1991 May 27, 2026
18201dc
[update] rewrite angular integration guide via article-guide skill
serhiipylypchuk1991 May 27, 2026
6e1f0c8
[update] rewrite react integration guide via article-guide skill
serhiipylypchuk1991 May 27, 2026
c0f5adb
[update] rewrite vue integration guide via article-guide skill
serhiipylypchuk1991 May 27, 2026
6f0e36f
[update] rewrite svelte integration guide via article-guide skill
serhiipylypchuk1991 May 27, 2026
64ff782
[update] rewrite eventcalendar integration guide via article-guide skill
serhiipylypchuk1991 May 27, 2026
e09011b
[update] rewrite scheduler integration guide via article-guide skill
serhiipylypchuk1991 May 27, 2026
6dcfac7
[fix] remove gerund opener in integration guides
serhiipylypchuk1991 May 28, 2026
ccbe18c
[add] OpenGraph/Twitter meta and JSON-LD structured data
serhiipylypchuk1991 May 22, 2026
b757a65
[fix] correct API names in booking guides
serhiipylypchuk1991 Jun 10, 2026
9a7d0fd
[fix] correct API config reference docs
serhiipylypchuk1991 Jun 10, 2026
e9f599b
[fix] correct API events reference docs
serhiipylypchuk1991 Jun 10, 2026
b973f16
[fix] correct API methods reference docs
serhiipylypchuk1991 Jun 10, 2026
f3a9325
[fix] correct API internal reference docs
serhiipylypchuk1991 Jun 10, 2026
b6b20db
[update] normalize internal doc links to .md form
serhiipylypchuk1991 Jun 12, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions docs/api/config/booking-cardshape.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ const defaultCardShape = {
preview: true,
price: true,
review: true,
subtitle: false,
subtitle: true,
title: true
};
~~~
Expand All @@ -70,10 +70,10 @@ The snippet below demonstrates how to configure what fields to display on the le
<iframe src="https://snippet.dhtmlx.com/6mxd7918?mode=result" frameborder="0" class="snippet_iframe" width="100%" height="600"></iframe>

:::info
You can also configure the appearance of a card using the [`cardTemplate`](/api/config/booking-cardtemplate) property. If both `cardTemplate` and `cardShape` are applied, `cardTemplate` will override the `cardShape` settings.
You can also configure the appearance of a card using the [`cardTemplate`](api/config/booking-cardtemplate.md) property. If both `cardTemplate` and `cardShape` are applied, `cardTemplate` will override the `cardShape` settings.
:::

**Related articles:**

- [Defining the structure of cards](/guides/configuration/#defining-the-structure-of-cards)
- [`cardTemplate`](/api/config/booking-cardtemplate)
- [Defining the structure of cards](guides/configuration.md#define-the-structure-of-cards)
- [`cardTemplate`](api/config/booking-cardtemplate.md)
25 changes: 12 additions & 13 deletions docs/api/config/booking-cardtemplate.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ description: You can learn about the cardTemplate config in the documentation of
The property specifies the HTML structure and layout of each card's block (the left side of each card). It means you can manage which fields are displayed, how they are arranged, and how they look.

:::info
You can also specify which fields to display using the [`cardShape`](/api/config/booking-cardshape) property
You can also specify which fields to display using the [`cardShape`](api/config/booking-cardshape.md) property
:::

### Usage
Expand All @@ -24,11 +24,11 @@ cardTemplate?: ({item: obj}) => string;

### Parameters

`cardTemplate` expects a function that takes a `card` object as input and returns a string of HTML that defines how the card should look.
`cardTemplate` expects a function that takes an `item` (card) object as input and returns a string of HTML that defines how the card should look.

### Example

In the example below we create a function that takes the `card` object and returns HTML for a card that includes a preview image (card.preview), category (card.category), title (card.title), and price (card.price). You need to create your own HTML template to be applied to a card and import the **template** helper. Then pass the function into the Booking configuration by assigning the function to the `cardTemplate` property.
In the example below we create a function that takes the `item` (card) object and returns HTML for a card that includes a preview image (item.preview), category (item.category), title (item.title), and price (item.price). You need to create your own HTML template to be applied to a card and import the **template** helper. Then pass the function into the Booking configuration by assigning the function to the `cardTemplate` property.

~~~html {}
<style>
Expand All @@ -51,29 +51,29 @@ In the example below we create a function that takes the `card` object and retur
<script>
const { Booking, template } = booking; //import template helper

function cardPreviewTemplate({ card }) {
function cardPreviewTemplate({ item }) {
return `
<div class="custom-preview" data-action="preview-click">
<div class="preview-left">
<div
style="background-image: url(${card.preview})"
style="background-image: url(${item.preview})"
class="card-photo"
></div>
<!-- <div class="card-photo-empty" /> -->
</div>

<div class="preview-right">
<div class="category">${card.category}</div>
<div class="title">${card.title}</div>
<div class="price">${card.price}</div>
<div class="category">${item.category}</div>
<div class="title">${item.title}</div>
<div class="price">${item.price}</div>
</div>
</div>
`;
}

const widget = new Booking("#root", {
data,
cardTemplate: template(card => cardPreviewTemplate(card)), // pass the function to Booking configuration
cardTemplate: template(item => cardPreviewTemplate(item)), // pass the function to Booking configuration
});
// other parameters
</script>
Expand All @@ -84,8 +84,7 @@ The snippet below demonstrates how to apply a template to the left block of a ca

<iframe src="https://snippet.dhtmlx.com/k2v01vng" frameborder="0" class="snippet_iframe" width="100%" height="600"></iframe>

**Related articles:**

- [Defining the structure of cards](/guides/configuration/#defining-the-structure-of-cards)
- [`cardShape`](/api/config/booking-cardshape)
**Related articles:**

- [Defining the structure of cards](guides/configuration.md#define-the-structure-of-cards)
- [`cardShape`](api/config/booking-cardshape.md)
19 changes: 6 additions & 13 deletions docs/api/config/booking-data.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ data: [
stars: number,
count: number
},
slots: [
slots?: [
{
from: number | string, // hours from 0 to 24
to: number | string, // hours from 0 to 24
Expand All @@ -36,12 +36,7 @@ data: [
dates?: array, // exact dates for which rule can be applied, timestamps
}
],
availableSlots?: [
{
id: string|number,
time:[number, number] //timestamp, length in minutes
},
],
availableSlots?: [number, number][], // each slot: [timestamp, slot duration in minutes]
usedSlots?: number[], //timestamps
slotSize?: number, //minutes
slotGap?: number //minutes
Expand All @@ -63,7 +58,7 @@ For each card object you can specify the following parameters:
- `review` - (optional) rating information that includes the following parameters:
- `stars` - (optional) the number of rating stars (out of five)
- `count` - (optional) the number of reviews
- `slots` - (required) an array of objects with the following parameters for each slot object:
- `slots` - (optional) an array of objects that defines slot rules (either `slots` or `availableSlots` should be provided to display bookable time); each slot object has the following parameters:
- `from` - (required) a slot start time in hours from 0 to 24
- `to` - (required) a slot end time in hours from 0 to 24
- `size` - (optional) the duration of one slot in minutes
Expand All @@ -77,9 +72,7 @@ Slot parameters specified for dates will override parameters defined for specifi
If several slots objects are created for the same day, make sure that slots time ranges (from and to) with **different** size and gap do not overlap, otherwise all slots data for these days will not be applied.
:::

- `availableSlots` - (optional) an array of timestamps of available slots in milliseconds; if available slots are specified here, all slots from the `slots` array are ignored (i.e., become unavailable); each object in the array has the next parameters:
- `id` - (required) the id of a slot
- `time` - (required) an array that includes timestamp and slot duration in minutes (timestamps are in a local timezone)
- `availableSlots` - (optional) an array of available slots; each slot is an array `[timestamp, duration]` where the timestamp is in milliseconds (in a local timezone) and the duration is the slot length in minutes; if available slots are specified here, all slots from the `slots` array are ignored (i.e., become unavailable)
- `usedSlots` - (optional) an array of timestamps of booked slots in milliseconds (timestamps are in a local timezone)
- `slotSize` - (optional) the duration of a slot in minutes; the value will be applied to all slots of this card if other value is not set inside the `slots` object; *60* minutes is set by default
- `slotGap` - (optional) the gap between slots in minutes that is set for all slots in the current card; this value is applied if any other value is not specified inside the `slots` object; 0 is set by default
Expand All @@ -98,7 +91,7 @@ const data = [
preview: "https://snippet.dhtmlx.com/codebase/data/booking/01/img/01.jpg",
price: "37 $",
review: {
star: 1,
stars: 1,
count: 40
},
slots: [
Expand Down Expand Up @@ -137,4 +130,4 @@ new booking.Booking("#root", {
});
~~~

**Related articles:** [Defining slot rules](/guides/configuration#defining-slot-rules)
**Related articles:** [Defining slot rules](guides/configuration.md#define-slot-rules)
2 changes: 1 addition & 1 deletion docs/api/config/booking-end.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@ new booking.Booking("#root", {
});
~~~

The snippet below shows how to set the [start](/api/config/booking-start) and end dates:
The snippet below shows how to set the [start](api/config/booking-start.md) and end dates:

<iframe src="https://snippet.dhtmlx.com/cc28whe7?mode=result" frameborder="0" class="snippet_iframe" width="100%" height="600"></iframe>
2 changes: 1 addition & 1 deletion docs/api/config/booking-filtershape.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ filterShape: {

- `text` - (optional) if **true**, the text input field is displayed (default); if **false**, the text field is hidden
- `id` - (required) the id of a card
- `suggest` - (required) if **true**, the auto-complete is enabled and the values (from the [`data`](/api/config/booking-data) object) that match a user's input text will be displayed
- `suggest` - (optional) if **true**, the auto-complete is enabled and the values (from the [`data`](api/config/booking-data.md) object) that match a user's input text will be displayed
- `label` - (optional) the label for the property from the `data` object. See [Default config](#default-config) below.
- `date` - (optional) shows/hides the date field; **true** is set by default (the field is shown)
- `time` - (optional) shows/hides the time field. If set to **true**, it takes an array of objects with default time options for a slot. For each object you can specify the following parameters:
Expand Down
10 changes: 5 additions & 5 deletions docs/api/config/booking-formshape.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ description: You can learn about the formShape config in the documentation of th
### Usage

~~~jsx {}
formShape: {
formShape: [{
comp: "text" | "textarea",
key: string,
label?: string,
required?: boolean
};
}];
~~~

### Parameters
Expand Down Expand Up @@ -68,17 +68,17 @@ const defaultFormShape = [
~~~jsx {1-17,21}
const formShape = [
{
type: "text",
comp: "text",
key: "name",
label: "Name"
},
{
type: "text",
comp: "text",
key: "contact",
label: "Mobile"
},
{
type: "textarea",
comp: "textarea",
key: "description",
label: "Details"
},
Expand Down
6 changes: 3 additions & 3 deletions docs/api/config/booking-infoshape.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,10 @@ The snippet below shows how to configure what to display on the left side of the
<iframe src="https://snippet.dhtmlx.com/pd6wp1xc?mode=result" frameborder="0" class="snippet_iframe" width="100%" height="600"></iframe>

:::info
You can also control which fields to display in the information block of the Booking dialog using the [`infoTemplate`](/api/config/booking-infotemplate) property. But if both properties are applied, `infoTemplate` will override the `infoShape` settings.
You can also control which fields to display in the information block of the Booking dialog using the [`infoTemplate`](api/config/booking-infotemplate.md) property. But if both properties are applied, `infoTemplate` will override the `infoShape` settings.
:::

**Related articles:**

- [Configuring the Booking dialog](/guides/configuration/#configuring-the-booking-dialog)
- [`infoTemplate`](/api/config/booking-infotemplate)
- [Configuring the Booking dialog](guides/configuration.md#configure-the-booking-dialog)
- [`infoTemplate`](api/config/booking-infotemplate.md)
6 changes: 3 additions & 3 deletions docs/api/config/booking-infotemplate.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,10 @@ The snippet below shows how to apply a template to the information block of the
<iframe src="https://snippet.dhtmlx.com/byb94ipu?mode=result" frameborder="0" class="snippet_iframe" width="100%" height="600"></iframe>

:::info
You can also control which fields to display in the information block of the Booking dialog using the [`infoShape`](/api/config/booking-infoshape) property. But if both properties are applied, `infoTemplate` will override the `infoShape` settings.
You can also control which fields to display in the information block of the Booking dialog using the [`infoShape`](api/config/booking-infoshape.md) property. But if both properties are applied, `infoTemplate` will override the `infoShape` settings.
:::

**Related articles:**

- [Configuring the Booking dialog](/guides/configuration/#configuring-the-booking-dialog)
- [`infoShape`](/api/config/booking-infoshape)
- [Configuring the Booking dialog](guides/configuration.md#configure-the-booking-dialog)
- [`infoShape`](api/config/booking-infoshape.md)
12 changes: 6 additions & 6 deletions docs/api/config/booking-locale.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,22 +18,22 @@ locale?: object;

### Default config

By default, Booking uses the [English](/guides/localization/#default-locale) locale. You can set it to the custom locale as well.
By default, Booking uses the [English](guides/localization.md#default-locale) locale. You can set it to the custom locale as well.

:::tip
To change the current locale dynamically, you can use the [`setLocale()`](/api/methods/booking-setlocale-method) method
To change the current locale dynamically, you can use the [`setLocale()`](api/methods/booking-setlocale-method.md) method
:::

### Example

~~~jsx
const { data } = getData();
const booking = new booking.Booking("#root", {
const widget = new booking.Booking("#root", {
data,
locale: de
locale: booking.locales.de
});
~~~

**Related articles**:
- [setLocale()](/api/methods/booking-setlocale-method)
- [Localization](/guides/localization)
- [setLocale()](api/methods/booking-setlocale-method.md)
- [Localization](guides/localization.md)
4 changes: 2 additions & 2 deletions docs/api/config/booking-slotgap.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ description: You can learn about the slotGap in the documentation of the DHTMLX
@short: Optional. Defines a gap between booking slots for all cards

:::note
The value will be applied in case the gap value is not set for the `gap` or `slotGap` parameter inside the [`data`](/api/config/booking-data) property.
The value will be applied in case the gap value is not set for the `gap` or `slotGap` parameter inside the [`data`](api/config/booking-data.md) property.
:::

### Usage
Expand All @@ -35,6 +35,6 @@ new booking.Booking("#root", {
});
~~~

The snippet below shows how to set [duration](/api/config/booking-slotsize) and gap for all slots:
The snippet below shows how to set [duration](api/config/booking-slotsize.md) and gap for all slots:

<iframe src="https://snippet.dhtmlx.com/pw8xsl1p?mode=result" frameborder="0" class="snippet_iframe" width="100%" height="600"></iframe>
4 changes: 2 additions & 2 deletions docs/api/config/booking-slotsize.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ description: You can learn about the slotSize in the documentation of the DHTMLX
@short: Optional. Defines the duration of a booking slot for all cards

:::note
This value will be applied in case the size value is not set for the `size` or `slotSize` parameter inside the [`data`](/api/config/booking-data) property.
This value will be applied in case the size value is not set for the `size` or `slotSize` parameter inside the [`data`](api/config/booking-data.md) property.
:::

### Usage
Expand All @@ -35,6 +35,6 @@ new booking.Booking("#root", {
});
~~~

The snippet below shows how to set duration and [gap](/api/config/booking-slotgap) for all slots:
The snippet below shows how to set duration and [gap](api/config/booking-slotgap.md) for all slots:

<iframe src="https://snippet.dhtmlx.com/pw8xsl1p?mode=result" frameborder="0" class="snippet_iframe" width="100%" height="600"></iframe>
2 changes: 1 addition & 1 deletion docs/api/config/booking-start.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@ new booking.Booking("#root", {
});
~~~

The snippet below shows how to set the start and [end](/api/config/booking-end) dates:
The snippet below shows how to set the start and [end](api/config/booking-end.md) dates:

<iframe src="https://snippet.dhtmlx.com/cc28whe7?mode=result" frameborder="0" class="snippet_iframe" width="100%" height="600"></iframe>
12 changes: 6 additions & 6 deletions docs/api/events/booking-confirmslot-event.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ The callback of the **confirm-slot** event can take an object with the following
- `slot` - (required) an object with the next slot parameters:
- `id` - (required) the ID of a card for which the booking of a slot is confirmed
- `time` - (required) an array with the slot start time in milliseconds and the slot duration in minutes (timestamps are in a local timezone)
- `data` - (required) an abject with the booking screen fields with the following parameters for each field:
- `key` - (required) the form field ID (from the [`formShape`](/api/config/booking-formshape)). By default, three fields are added: *name*, *email*, *description*
- `data` - (required) an object with the booking screen fields with the following parameters for each field:
- `key` - (required) the form field ID (from the [`formShape`](api/config/booking-formshape.md)). By default, three fields are added: *name*, *email*, *description*
- `confirm` - (required) an object with the next parameters:
- `promise` - (required) a promise that represents the confirmation status. This is a JavaScript Promise object that represents the asynchronous operation of confirming the slot booking. The promise will be resolved or rejected based on the outcome of the booking process. You can attach `.then` and `.catch` handlers to this promise to handle the success or failure of the booking.
- `done` - (required) a callback function that should be called when booking is successfully confirmed. Calling this function will resolve the promise, indicating that the booking was successful. You can call this function after receiving a positive response from the server.
Expand All @@ -47,14 +47,14 @@ The callback of the **confirm-slot** event can take an object with the following

~~~jsx {7-10}
// create Booking
const booking = new booking.Booking("#root", {
const widget = new booking.Booking("#root", {
data,
// other configuration parameters
});

booking.api.on("confirm-slot", (obj) => {
console.log("The slot id for which booking was confirmed:", obj.id);
widget.api.on("confirm-slot", (obj) => {
console.log("The slot id for which booking was confirmed:", obj.slot.id);
});
~~~

**Related articles:** [`setConfirmHandler`](/api/methods/booking-setconfirmhandler-method) method
**Related articles:** [`setConfirmHandler`](api/methods/booking-setconfirmhandler-method.md) method
6 changes: 3 additions & 3 deletions docs/api/events/booking-filterdata-event.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,15 @@ The callback of the **filter-data** event can take an object with the following

### Example

The example below demonstrates how to apply filter at the initialization using the [`api.exec()`](/api/internal/booking-exec) method:
The example below demonstrates how to apply filter at the initialization using the [`api.exec()`](api/internal/booking-exec.md) method:

~~~jsx {6-18}
// create Booking
const booking = new booking.Booking("#root", {
const widget = new booking.Booking("#root", {
data,
// other configuration parameters
});
booking.api.exec("filter-data", {
widget.api.exec("filter-data", {
text: "Allergist",
date: {
start: new Date,
Expand Down
4 changes: 2 additions & 2 deletions docs/api/events/booking-selectitem-event.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@ The callback of the **select-item** event can take an object with the following

~~~jsx {7-10}
// create Booking
const booking = new booking.Booking("#root", {
const widget = new booking.Booking("#root", {
data,
// other configuration parameters
});

// output the id of the selected item
booking.api.on("select-item", (ev) => {
widget.api.on("select-item", (ev) => {
console.log(ev.id);
});
~~~
Loading