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: api-reference/10 UI Components/dxScheduler/1 Configuration/currentView.md
+7Lines changed: 7 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,6 +17,13 @@ When more than one view matches the **currentView** value, the Scheduler display
17
17
18
18
To subscribe to changes of the current view, use the [onOptionChanged](/api-reference/10%20UI%20Components/dxScheduler/1%20Configuration/onOptionChanged.md'/Documentation/ApiReference/UI_Components/dxScheduler/Configuration/#onOptionChanged') handler.
19
19
20
+
[note]
21
+
22
+
- Be sure to include the **currentView** value in the **views** array.
23
+
- If the **views** array is empty or contains a single item, Scheduler hides the view switcher.
Copy file name to clipboardExpand all lines: api-reference/10 UI Components/dxScheduler/1 Configuration/views/views.md
+8-1Lines changed: 8 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -35,7 +35,14 @@ An individual view's configuration. Set the [type](/api-reference/10%20UI%20Comp
35
35
36
36
For more information about how to customize an individual view, refer to the following topic: [Customize Individual Views](/concepts/05%20UI%20Components/Scheduler/060%20Views/020%20Customize%20Individual%20Views.md '/Documentation/Guide/UI_Components/Scheduler/Views/Customize_Individual_Views/').
37
37
38
-
To specify the default view, use the [currentView](/api-reference/10%20UI%20Components/dxScheduler/1%20Configuration/currentView.md'/Documentation/ApiReference/UI_Components/dxScheduler/Configuration/#currentView') property.
38
+
To specify the current view, configure the [currentView](/api-reference/10%20UI%20Components/dxScheduler/1%20Configuration/currentView.md'/Documentation/ApiReference/UI_Components/dxScheduler/Configuration/#currentView') property.
39
+
40
+
[note]
41
+
42
+
- Be sure to include the **currentView** value in the **views** array.
43
+
- If the **views** array is empty or contains a single item, Scheduler hides the view switcher.
View switcher is a scheduler element used for quick switching between views.
1
+
The view switcher is a predefined [toolbar](/Documentation/ApiReference/UI_Components/dxScheduler/Configuration/toolbar/) item that allows users to switch between Scheduler views.
To specify what views are available within the switcher, use the [views](/api-reference/10%20UI%20Components/dxScheduler/1%20Configuration/views'/Documentation/ApiReference/UI_Components/dxScheduler/Configuration/views/')property.
5
+
To specify available views, configure the [views](/api-reference/10%20UI%20Components/dxScheduler/1%20Configuration/views'/Documentation/ApiReference/UI_Components/dxScheduler/Configuration/views/')array. To specify the current view, configure the [currentView](/Documentation/ApiReference/UI_Components/dxScheduler/Configuration/#currentView) property:
6
6
7
7
---
8
8
9
9
##### jQuery
10
10
11
-
<!--JavaScript-->
11
+
<!-- index.js -->
12
12
$(function(){
13
13
$("#schedulerContainer").dxScheduler({
14
14
// ...
15
15
views: ['day', 'week', 'agenda']
16
+
currentView: 'day',
16
17
});
17
18
});
18
19
19
20
##### Angular
20
21
21
-
<!--HTML-->
22
+
<!-- app.component.html -->
22
23
<dx-scheduler ...
23
-
[views]="['day', 'week', 'agenda']">
24
-
</dx-scheduler>
24
+
[views]="views"
25
+
currentView="day"
26
+
></dx-scheduler>
25
27
26
-
<!--TypeScript-->
28
+
<!-- app.component.ts -->
27
29
import { DxSchedulerModule } from "devextreme-angular";
30
+
28
31
// ...
29
32
export class AppComponent {
30
-
// ...
33
+
views = ['day', 'week', 'agenda'];
31
34
}
32
35
@NgModule({
33
36
imports: [
34
37
// ...
35
38
DxSchedulerModule
36
39
],
37
-
// ...
38
40
})
39
41
40
42
##### Vue
@@ -43,126 +45,51 @@ To specify what views are available within the switcher, use the [views](/api-re
43
45
<template>
44
46
<DxScheduler
45
47
:views="views"
48
+
current-view="day"
46
49
/>
47
50
</template>
48
51
49
52
<script>
50
-
import 'devextreme/dist/css/dx.light.css';
51
-
52
-
import DxScheduler from 'devextreme-vue/scheduler';
- Be sure to include the **currentView** value in the **views** array.
84
+
- If the **views** array is empty or contains a single item, Scheduler hides the view switcher.
91
85
92
-
To use the drop-down menu on all types of devices, assign **true** to the [useDropDownViewSwitcher](/api-reference/10%20UI%20Components/dxScheduler/1%20Configuration/useDropDownViewSwitcher.md'/Documentation/ApiReference/UI_Components/dxScheduler/Configuration/#useDropDownViewSwitcher') property; to use tabs - assign **false**.
86
+
[/note]
93
87
94
-
---
95
-
96
-
#####jQuery
97
-
98
-
<!--JavaScript-->
99
-
$(function(){
100
-
$("#schedulerContainer").dxScheduler({
101
-
// ...
102
-
useDropDownViewSwitcher: true
103
-
});
104
-
});
88
+
On mobile devices, Scheduler displays the view switcher as a drop-down menu:
105
89
106
-
#####Angular
107
-
108
-
<!--HTML-->
109
-
<dx-scheduler ...
110
-
[useDropDownViewSwitcher]="true">
111
-
</dx-scheduler>
112
-
113
-
<!--TypeScript-->
114
-
import { DxSchedulerModule } from "devextreme-angular";
115
-
// ...
116
-
export class AppComponent {
117
-
// ...
118
-
}
119
-
@NgModule({
120
-
imports: [
121
-
// ...
122
-
DxSchedulerModule
123
-
],
124
-
// ...
125
-
})
126
-
127
-
##### Vue
128
-
129
-
<!-- tab: App.vue -->
130
-
<template>
131
-
<DxScheduler
132
-
:use-drop-down-view-switcher="true" />
133
-
</template>
134
-
135
-
<script>
136
-
import 'devextreme/dist/css/dx.light.css';
137
-
138
-
import DxScheduler from 'devextreme-vue/scheduler';
139
-
140
-
export default {
141
-
components: {
142
-
DxScheduler
143
-
}
144
-
}
145
-
</script>
146
-
147
-
##### React
148
-
149
-
<!-- tab: App.js -->
150
-
import React from 'react';
151
-
152
-
import 'devextreme/dist/css/dx.light.css';
153
-
154
-
import Scheduler from 'devextreme-react/scheduler';
To integrate the drop-down menu view switcher on other devices, enable [useDropDownViewSwitcher](/api-reference/10%20UI%20Components/dxScheduler/1%20Configuration/useDropDownViewSwitcher.md'/Documentation/ApiReference/UI_Components/dxScheduler/Configuration/#useDropDownViewSwitcher').
0 commit comments