Skip to content

Commit 51ae516

Browse files
committed
[update] start, end props added, configuration updated
1 parent 00e6d81 commit 51ae516

7 files changed

Lines changed: 80 additions & 40 deletions

File tree

docs/api/config/booking-end.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
---
2+
sidebar_label: end
3+
title: end
4+
description: You can learn about the end date in the documentation of the DHTMLX JavaScript Booking library. Browse developer guides and API reference, try out code examples and live demos, and download a free 30-day evaluation version of DHTMLX Booking.
5+
---
6+
7+
# end
8+
9+
### Description
10+
11+
@short: Optional. Defines the date until which to show available slots
12+
13+
### Usage
14+
15+
~~~jsx {}
16+
end?: Date;
17+
~~~
18+
19+
### Parameters
20+
21+
- `Date` - the end date until which to display available slots; the default value is one year from the current date.
22+
23+
### Example
24+
25+
~~~jsx {}
26+
new booking.Booking("#root", {
27+
data,
28+
end: new Date(2025, 11, 11),
29+
// other parameters
30+
});
31+
~~~
32+
33+

docs/api/config/booking-slotlimit.md

Lines changed: 0 additions & 33 deletions
This file was deleted.

docs/api/config/booking-start.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
---
2+
sidebar_label: start
3+
title: start
4+
description: You can learn about the start date in the documentation of the DHTMLX JavaScript Booking library. Browse developer guides and API reference, try out code examples and live demos, and download a free 30-day evaluation version of DHTMLX Booking.
5+
---
6+
7+
# start
8+
9+
### Description
10+
11+
@short: Optional. Defines the date from which to start showing available slots
12+
13+
### Usage
14+
15+
~~~jsx {}
16+
start?: Date;
17+
~~~
18+
19+
### Parameters
20+
21+
- `Date` - the start date from which to display available slots; the default value is the current date.
22+
23+
### Example
24+
25+
~~~jsx {}
26+
new booking.Booking("#root", {
27+
data,
28+
start: new Date(2024, 10, 10),
29+
// other parameters
30+
});
31+
~~~
32+
33+
34+
The snippet below shows how to set the start date:
35+
36+
<iframe src="https://snippet.dhtmlx.com/cm7871sl?mode=result" frameborder="0" class="snippet_iframe" width="100%" height="600"></iframe>
37+

docs/api/overview/booking-api-overview.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,11 +64,12 @@ new booking.Booking("#root", {
6464
| Name | Description |
6565
| ----------------------------------------- | ------------------------------------------------ |
6666
| [](../config/booking-data.md) | @getshort(../config/booking-data.md) |
67+
| [](../config/booking-end.md) | @getshort(../config/booking-end.md) |
6768
| [](../config/booking-cardshape.md) | @getshort(../config/booking-cardshape.md) |
6869
| [](../config/booking-filtershape.md) | @getshort(../config/booking-filtershape.md) |
6970
| [](../config/booking-formshape.md) | @getshort(../config/booking-formshape.md) |
7071
| [](../config/booking-infoshape.md) | @getshort(../config/booking-infoshape.md) |
7172
| [](../config/booking-locale.md) | @getshort(../config/booking-locale.md) |
7273
| [](../config/booking-slotgap.md) | @getshort(../config/booking-slotgap.md) |
73-
| [](../config/booking-slotlimit.md) | @getshort(../config/booking-slotlimit.md) |
74-
| [](../config/booking-slotsize.md) | @getshort(../config/booking-slotsize.md) |
74+
| [](../config/booking-slotsize.md) | @getshort(../config/booking-slotsize.md) |
75+
| [](../config/booking-start.md) | @getshort(../config/booking-start.md) |

docs/api/overview/booking-properties-overview.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,12 @@ description: You can have properties overview of JavaScript Booking in the docum
99
| Name | Description |
1010
| ----------------------------------------- | ------------------------------------------------ |
1111
| [](../config/booking-data.md) | @getshort(../config/booking-data.md) |
12+
| [](../config/booking-end.md) | @getshort(../config/booking-end.md) |
1213
| [](../config/booking-cardshape.md) | @getshort(../config/booking-cardshape.md) |
1314
| [](../config/booking-filtershape.md) | @getshort(../config/booking-filtershape.md) |
1415
| [](../config/booking-formshape.md) | @getshort(../config/booking-formshape.md) |
1516
| [](../config/booking-infoshape.md) | @getshort(../config/booking-infoshape.md) |
1617
| [](../config/booking-locale.md) | @getshort(../config/booking-locale.md) |
1718
| [](../config/booking-slotgap.md) | @getshort(../config/booking-slotgap.md) |
18-
| [](../config/booking-slotlimit.md) | @getshort(../config/booking-slotlimit.md) |
19-
| [](../config/booking-slotsize.md) | @getshort(../config/booking-slotsize.md) |
19+
| [](../config/booking-slotsize.md) | @getshort(../config/booking-slotsize.md) |
20+
| [](../config/booking-start.md) | @getshort(../config/booking-start.md) |

docs/guides/configuration.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ In case you have common slots parameters and specific parameters for some days,
135135
- 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.
136136
:::
137137

138-
For all slots of the widget, you can also set the [`slotLimit`](/api/config/booking-slotlimit) value that defines the next available date until which slots should be searched in case none are found for 5 days starting from the current date or the start date in the filter; the default value is the current Date.
138+
For all slots of the widget, you can also set the [`end`](/api/config/booking-end) value that defines the date until which slots are displayed and/or the [`start`](/api/config/booking-start) date from which to start showing slots.
139139

140140
#### Examples of defining slot rules
141141

sidebars.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,15 +111,16 @@ module.exports = {
111111
},
112112
items: [
113113
// Booking properties
114-
"api/config/booking-data",
115114
"api/config/booking-cardshape",
115+
"api/config/booking-data",
116+
"api/config/booking-end",
116117
"api/config/booking-filtershape",
117118
"api/config/booking-formshape",
118119
"api/config/booking-infoshape",
119120
"api/config/booking-locale",
120121
"api/config/booking-slotgap",
121-
"api/config/booking-slotlimit",
122122
"api/config/booking-slotsize",
123+
"api/config/booking-start",
123124
]
124125
}
125126
]

0 commit comments

Comments
 (0)