You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+86-14Lines changed: 86 additions & 14 deletions
Original file line number
Diff line number
Diff line change
@@ -1,24 +1,43 @@
1
-
[](https://vaadin.com/directory/component/template-add-on)
2
-
[](https://vaadin.com/directory/component/template-add-on)
[](https://vaadin.com/directory/component/date-time-range-picker-add-on)
2
+
[](https://vaadin.com/directory/component/date-time-range-picker-add-on)
This is a template project for building new Vaadin 24 add-ons
9
+
A component to create [Time Intervals](https://en.wikipedia.org/wiki/ISO_8601#Time_intervals) (_a time period defined by start and end instants_) inside a time frame.
10
10
11
-
## Features
11
+
You use the UI to define time and date ranges in which the time intervals should be created, and then call the API to operate them.
12
+
13
+
As an example, you could set it to create an interval **every weekend** from **8:30 to 12:30 AM** between the
14
+
**1st and 15th of May 2025**.<br>Then, you can make the following queries:
15
+
16
+
1. How many intervals will be created? (4)
17
+
2. Starting from today, when will the next interval occur?
18
+
3. Is the 7th of May at 9:15 AM included in any interval? (It's not)
19
+
- How about the 5th of May at 9:00 AM? (Yes)
20
+
4. How many intervals will have passed after the 9th of May? (2)
21
+
5. How many intervals will remain after the 5th of May at 12:45? (3)
22
+
23
+
... and more
12
24
13
-
* List the features of your add-on in here
25
+
> [!NOTE]
26
+
> Custom time zones are currently not supported. It will fall back to the system's default.
27
+
28
+
## Features
29
+
- Customizable selection of date, time and days.
30
+
- API to create and query time intervals. It supports two work modes:
31
+
-**Lazy** (<ins>default</ins>): will not store time intervals and instead supply (create) them on demand.
32
+
-**Eager**: will create and store them beforehand so they can be reused on every request.
- (1) The **Pojo** class is binded using its getter and setter methods (2).
118
+
- (2) The **DateTimeRangePicker** is binded. Its [value](https://vaadin.com/api/platform/current/com/vaadin/flow/component/HasValue.html) can be operated now.
119
+
- (3) The **DateTimeRange** instance is saved in the **Pojo** class or returned from it.
120
+
121
+
122
+
You can operate time intervals with the **DateTimeRange** class, which acts as a holder.
0 commit comments