Skip to content

Commit f21f01a

Browse files
Scheduler: Update Offset topics (DevExpress#8124) (DevExpress#8128)
1 parent 80cf676 commit f21f01a

File tree

2 files changed

+27
-38
lines changed

2 files changed

+27
-38
lines changed

api-reference/10 UI Components/dxScheduler/1 Configuration/offset.md

Lines changed: 13 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,12 @@ default: 0
55
---
66
---
77
##### shortDescription
8-
Specifies the minute offset within Scheduler indicating the starting point of a day.
8+
Specifies the minute offset applied to configured day durations in all views.
99

1010
---
11-
This property moves the interval between [startDayHour](/api-reference/10%20UI%20Components/dxScheduler/1%20Configuration/startDayHour.md '/Documentation/ApiReference/UI_Components/dxScheduler/Configuration/#startDayHour') and [endDayHour](/api-reference/10%20UI%20Components/dxScheduler/1%20Configuration/endDayHour.md '/Documentation/ApiReference/UI_Components/dxScheduler/Configuration/#endDayHour'). The offset is a multiple of 5 and can range from -1440 minutes (-24 hours) to 1440 minutes (24 hours). For instance, if the following is true:
11+
This property shifts the interval between [startDayHour](/api-reference/10%20UI%20Components/dxScheduler/1%20Configuration/startDayHour.md '/Documentation/ApiReference/UI_Components/dxScheduler/Configuration/#startDayHour') and [endDayHour](/api-reference/10%20UI%20Components/dxScheduler/1%20Configuration/endDayHour.md '/Documentation/ApiReference/UI_Components/dxScheduler/Configuration/#endDayHour'). The **offset** value can range from `-1440` (24 hours behind) to `1440` (24 hours ahead).
1212

13-
- The offset is set to 240.
14-
15-
- **startDayHour** is 0 (default).
16-
17-
- **endDayHour** is 24 (default).
18-
19-
Then, the day starts and ends at 04:00 AM instead of 00:00.
20-
21-
You can combine this property with different values of **startDayHour**, **endDayHour**, and [cellDuration](/api-reference/10%20UI%20Components/dxScheduler/1%20Configuration/cellDuration.md '/Documentation/ApiReference/UI_Components/dxScheduler/Configuration/#cellDuration') to get the desired result. For example, the following code snippet uses all these properties, and as a result, the day starts at 4:40 AM and ends at 12:00 PM.
13+
You can implement **offset** along with different **startDayHour**, **endDayHour**, and [cellDuration](/api-reference/10%20UI%20Components/dxScheduler/1%20Configuration/cellDuration.md '/Documentation/ApiReference/UI_Components/dxScheduler/Configuration/#cellDuration') combinations to customize views. The following code snippet integrates these properties to configure days from 4:40 AM to 11:40 AM and a 40-minute cell duration:
2214

2315
---
2416
##### jQuery
@@ -57,15 +49,12 @@ You can combine this property with different values of **startDayHour**, **endDa
5749
/>
5850
</template>
5951

60-
<script>
61-
// ...
62-
</script>
63-
6452
##### React
6553

66-
<!-- tab: App.js -->
67-
// ...
68-
export default function App() {
54+
<!-- tab: App.tsx -->
55+
import { Scheduler } from 'devextreme-react/scheduler';
56+
57+
function App() {
6958
return (
7059
<Scheduler ...
7160
offset="-20"
@@ -78,7 +67,12 @@ You can combine this property with different values of **startDayHour**, **endDa
7867

7968
---
8069

81-
[note] This property has no effect on the agenda view.
70+
[note]
71+
72+
- This property has no effect in the agenda view.
73+
- The **offset** value must be a multiple of 5.
74+
75+
[/note]
8276

8377
#include btn-open-demo with {
8478
href: "https://js.devexpress.com/Demos/WidgetsGallery/Demo/Scheduler/WorkShifts/"

api-reference/10 UI Components/dxScheduler/1 Configuration/views/offset.md

Lines changed: 14 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,15 @@ default: 0
55
---
66
---
77
##### shortDescription
8-
Specifies the minute offset within the view indicating the starting point of a day.
8+
Specifies the minute offset applied to configured day durations in the view.
99

1010
---
11-
This property moves the interval between [startDayHour](/api-reference/10%20UI%20Components/dxScheduler/1%20Configuration/views/startDayHour.md '/Documentation/ApiReference/UI_Components/dxScheduler/Configuration/views/#startDayHour') and [endDayHour](/api-reference/10%20UI%20Components/dxScheduler/1%20Configuration/views/endDayHour.md '/Documentation/ApiReference/UI_Components/dxScheduler/Configuration/views/#endDayHour'). The offset is a multiple of 5 and can range from -1440 minutes (-24 hours) to 1440 minutes (24 hours). For instance, if the following is true:
11+
This property shifts the interval between [startDayHour](/api-reference/10%20UI%20Components/dxScheduler/1%20Configuration/views/startDayHour.md '/Documentation/ApiReference/UI_Components/dxScheduler/Configuration/views/#startDayHour') and [endDayHour](/api-reference/10%20UI%20Components/dxScheduler/1%20Configuration/views/endDayHour.md '/Documentation/ApiReference/UI_Components/dxScheduler/Configuration/views/#endDayHour'). The **offset** value can be between `-1440` (24 hours back) and `1440` (24 hours forward).
1212

13-
- The offset is set to 240.
14-
15-
- **startDayHour** is 0 (default).
16-
17-
- **endDayHour** is 24 (default).
18-
19-
Then, the day starts and ends at 04:00 AM instead of 00:00.
20-
21-
You can combine this property with different values of **startDayHour**, **endDayHour**, and [cellDuration](/api-reference/10%20UI%20Components/dxScheduler/1%20Configuration/views/cellDuration.md '/Documentation/ApiReference/UI_Components/dxScheduler/Configuration/views/#cellDuration') to get the desired result. For example, the following code snippet uses all these properties, and as a result, the day starts at 4:40 AM and ends at 12:00 PM.
13+
You can implement **offset** along with different **startDayHour**, **endDayHour**, and [cellDuration](/api-reference/10%20UI%20Components/dxScheduler/1%20Configuration/views/cellDuration.md '/Documentation/ApiReference/UI_Components/dxScheduler/Configuration/views/#cellDuration') combinations to customize the view. The following code snippet integrates these properties to configure days from 4:40 AM to 11:40 AM and a 40-minute cell duration:
2214

2315
---
16+
2417
##### jQuery
2518

2619
<!-- tab: index.js -->
@@ -68,15 +61,12 @@ You can combine this property with different values of **startDayHour**, **endDa
6861
</DxScheduler>
6962
</template>
7063

71-
<script>
72-
// ...
73-
</script>
74-
7564
##### React
7665

77-
<!-- tab: App.js -->
78-
// ...
79-
export default function App() {
66+
<!-- tab: App.tsx -->
67+
import { Scheduler } from 'devextreme-react/scheduler';
68+
69+
function App() {
8070
return (
8171
<Scheduler ... >
8272
<View
@@ -92,7 +82,12 @@ You can combine this property with different values of **startDayHour**, **endDa
9282

9383
---
9484

95-
[note] This property has no effect on the agenda view.
85+
[note]
86+
87+
- This property has no effect in the agenda view.
88+
- The **offset** value must be a multiple of 5.
89+
90+
[/note]
9691

9792
#include btn-open-demo with {
9893
href: "https://js.devexpress.com/Demos/WidgetsGallery/Demo/Scheduler/WorkShifts/"

0 commit comments

Comments
 (0)