Vue Scheduler - Customize Individual Views
To customize an individual view, specify a <DxView> configuration component. Assign a view type value to the views.type property to define which view is customized. Specify views[] properties to implement your changes.
The following code snippet customizes the "day" and "workWeek" views. This example groups appointments by a resource in the "workWeek" view. For more information about appointment grouping, refer to the following topic: Group Appointments by Resources.
- <template>
- <DxScheduler ... >
- <DxResource
- field-expr="ownerId"
- :data-source="employees"
- />
- <DxView type="day"
- :cell-duration="60"
- time-cell-template="time-cell"
- />
- <DxView type="workWeek" :groups="['ownerId']" />
- <template #time-cell="{ data }">
- <i style="color: green">{{data.text}}</i>
- </template>
- </DxScheduler>
- </template>
- <script>
- import { DxScheduler, DxResource, DxView } from 'devextreme-vue/scheduler';
- import 'devextreme/dist/css/dx.light.css';
- </script>
To add a view without customizations, specify only the views.type property:
- <template>
- <DxScheduler ... >
- <DxView type="day" />
- <DxView type="workWeek" />
- </DxScheduler>
- </template>
Customize Individual Views Demo Increase View Duration Demo