-
AI-powered Extensions
-
Data Grid
-
Tree List
-
Chat
-
HTML Editor
-
Form
-
-
Data Grids / Data Management
-
Data Grid
- Overview
-
Data Binding
-
Filtering
- Sorting
-
Editing
-
Grouping
-
Selection
- Focused Row
- Paging
-
Scrolling
-
Columns
- AI Assistant
-
Master-Detail
-
Data Summaries
-
Drag & Drop
-
Export to PDF
-
Export to Excel
- Appearance
-
Customization
- State Persistence
-
Adaptability
-
Keyboard Navigation
- Right-To-Left Support
-
Tree List
- Overview
-
Data Binding
-
Filtering
- Sorting
-
Editing
-
Selection
- Focused Row
- Paging
-
Columns
- Drag & Drop
- State Persistence
- Adaptability
-
Keyboard Navigation
-
Card View
-
Pivot Grid
- Overview
-
Data Binding
-
Field Management
-
Data Summaries
- Drill Down
- Filtering
-
Scrolling
-
Export to Excel
- Chart Integration
- Customization
- State Persistence
-
Filter Builder
-
-
Data Visualization
-
Charts
- Overview
-
Data Binding
-
Common Concepts
-
Axis
-
Aggregation
-
Tooltips
-
Selection
-
Customization
-
Zooming
-
Export
-
-
Area Charts
-
Bar Charts
- Bullet Charts
-
Doughnut Charts
-
Financial Charts
-
Funnel and Pyramid Charts
-
Line Charts
- Pareto Chart
-
Pie Charts
-
Point Charts
-
Polar and Radar Charts
-
Range Charts
- Sankey Chart
-
Sparkline Charts
-
Tree Map
-
Gauges
- Overview
-
Runtime update
-
Bar Gauge
-
Circular Gauge
-
Linear Gauge
-
Diagram
- Overview
-
Data Binding
-
Featured Shapes
-
Custom Shapes
-
Document Capabilities
-
User Interaction
- UI Customization
- Adaptability
-
-
Scheduling / Planning
-
Scheduler
- Overview
-
Data Binding
-
Views
-
Appointments
-
Timetable
- Editing
-
Grouping
- Virtual Scrolling
- Drag & Drop
-
Customization
- Adaptability
-
Gantt
- Overview
- Data Binding
-
Filtering
- Sorting
- Strip Lines
- Export to PDF
- Validation
-
Customization
-
-
Messaging
-
WYSIWYG Editor
-
Forms
-
Data Editors
- Overview
-
Common Concepts
-
Calendar
- Check Box
- Color Box
-
Date Box
-
Date Range Box
-
Number Box
- Radio Group
-
Range Selector
- Range Slider
- Slider
- Switch
- Text Area
- Text Box
-
Drop-Downs
- Autocomplete
-
Drop Down Box
-
Select Box
-
Tag Box
-
Lookup
-
Buttons
-
File Upload / File Management
-
File Manager
- Overview
-
File System Types
-
Customization
-
File Uploader
-
-
Popup and Notifications
-
Navigation
- Overview
- Accordion
-
Action Sheet
-
Context Menu
-
Menu
- Multi View
-
Drawer
-
Tab Panel
-
Tabs
-
Toolbar
-
Stepper
- Pagination
-
List
-
Tree View
- Right-to-Left Support
-
Layout
-
Tile View
- Splitter
-
Gallery
- Scroll View
- Box
- Responsive Box
-
-
Interactive Wrappers
-
Sortable
- Resizable
-
-
Progress Indicators
-
Maps
- Overview
-
Map
-
Vector Map
-
Data Binding
- Multiple Layers
-
Markers
- Legend
-
Zooming and Panning
-
Customization
-
-
Localization
Related Demos:
Your search did not match any results.
Angular Scheduler - Time Zone Support
DevExtreme Scheduler allows you to specify time zones used for the component and associated events/appointments. In this demo, you can change the time zone using the SelectBox positioned above the Scheduler. A getTimeZones() method call populates the SelectBox with appropriate values.
Backend API
<div class="option">
<span>Office Time Zone</span>
<dx-select-box
[items]="timeZones"
[width]="240"
[inputAttr]="{ 'aria-label': 'Location' }"
displayExpr="title"
valueExpr="id"
[(value)]="currentTimeZone"
>
</dx-select-box>
</div>
<dx-scheduler
[dataSource]="dataSource"
[timeZone]="currentTimeZone"
[views]="['workWeek']"
currentView="workWeek"
[currentDate]="currentDate"
[height]="600"
[startDayHour]="8"
(onAppointmentFormOpening)="onAppointmentFormOpening($event)"
(onOptionChanged)="onOptionChanged($event)"
>
<dxo-scheduler-editing [allowTimeZoneEditing]="true"> </dxo-scheduler-editing>
</dx-scheduler>
import { bootstrapApplication } from '@angular/platform-browser';
import { Component, enableProdMode, provideZoneChangeDetection } from '@angular/core';
import { DxSchedulerModule, DxSelectBoxModule } from 'devextreme-angular';
import { getTimeZones, dxSchedulerTimeZone } from 'devextreme/time_zone_utils';
import { DxSchedulerTypes } from 'devextreme-angular/ui/scheduler';
import { DataSource } from 'devextreme-angular/common/data';
import { Service, Data } from './app.service';
if (!/localhost/.test(document.location.host)) {
enableProdMode();
}
@Component({
selector: 'demo-app',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css'],
providers: [Service],
preserveWhitespaces: true,
imports: [
DxSchedulerModule,
DxSelectBoxModule,
],
})
export class AppComponent {
locations: string[];
dataSource: Data[];
service: Service;
currentDate: Date = new Date(2021, 3, 27);
timeZones: dxSchedulerTimeZone[] = [];
currentTimeZone = '';
constructor(service: Service) {
this.service = service;
this.dataSource = service.getData();
this.timeZones = this.getDefaultTimeZones(this.currentDate);
this.currentTimeZone = this.timeZones[0].id;
}
getDefaultTimeZones = (date: Date) => getTimeZones(date, this.service.getLocations());
onAppointmentFormOpening({ form }: DxSchedulerTypes.AppointmentFormOpeningEvent) {
const startDateDataSource = form.getEditor('startDateTimeZone').option('dataSource') as DataSource;
const endDateDataSource = form.getEditor('endDateTimeZone').option('dataSource') as DataSource;
startDateDataSource.filter(['id', 'contains', 'Europe']);
endDateDataSource.filter(['id', 'contains', 'Europe']);
startDateDataSource.load();
endDateDataSource.load();
}
onOptionChanged({ name, value }: DxSchedulerTypes.OptionChangedEvent) {
if (name === 'currentDate') {
this.timeZones = this.getDefaultTimeZones(value);
}
}
}
bootstrapApplication(AppComponent, {
providers: [
provideZoneChangeDetection({ eventCoalescing: true, runCoalescing: true }),
],
});
.option {
display: flex;
}
.option > span {
display: flex;
align-items: center;
margin-right: 10px;
}
::ng-deep .dx-scheduler {
margin-top: 20px;
}
import { Injectable } from '@angular/core';
export class Data {
text: string;
startDate: string;
endDate: string;
recurrenceRule?: string;
}
export class Location {
id: string;
offset: number;
title: string;
}
export const data: Data[] = [{
text: 'Stand-up meeting',
startDate: '2021-04-26T15:30:00.000Z',
endDate: '2021-04-26T15:45:00.000Z',
recurrenceRule: 'FREQ=DAILY',
}, {
text: 'Book Flights to San Fran for Sales Trip',
startDate: '2021-04-28T18:00:00.000Z',
endDate: '2021-04-28T19:00:00.000Z',
}, {
text: 'New Brochures',
startDate: '2021-04-30T18:30:00.000Z',
endDate: '2021-04-30T18:45:00.000Z',
}, {
text: 'Website Re-Design Plan',
startDate: '2021-04-27T12:30:00.000Z',
endDate: '2021-04-27T13:30:00.000Z',
}, {
text: 'Book Flights to San Fran for Sales Trip',
startDate: '2021-04-28T16:00:00.000Z',
endDate: '2021-04-28T15:00:00.000Z',
}, {
text: 'Prepare 2021 Marketing Plan',
startDate: '2021-04-26T07:00:00.000Z',
endDate: '2021-04-26T09:30:00.000Z',
}, {
text: 'Launch New Website',
startDate: '2021-04-28T08:00:00.000Z',
endDate: '2021-04-28T10:00:00.000Z',
}, {
text: 'Submit New Website Design',
startDate: '2021-04-29T09:30:00.000Z',
endDate: '2021-04-29T11:00:00.000Z',
}, {
text: 'Upgrade Server Hardware',
startDate: '2021-04-30T06:30:00.000Z',
endDate: '2021-04-30T08:00:00.000Z',
}, {
text: 'Approve New Online Marketing Strategy',
startDate: '2021-04-30T11:00:00.000Z',
endDate: '2021-04-30T12:30:00.000Z',
}, {
text: 'Final Budget Review',
startDate: '2021-04-27T09:00:00.000Z',
endDate: '2021-04-27T10:35:00.000Z',
}];
export const locations = ['Europe/London', 'Europe/Berlin', 'Europe/Helsinki'];
@Injectable()
export class Service {
getLocations() {
return locations;
}
getData() {
return data;
}
}
<!DOCTYPE html>
<html lang="en">
<head>
<title>DevExtreme Demo</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=5.0" />
<link rel="stylesheet" type="text/css" href="https://cdn3.devexpress.com/jslib/26.1.5/css/dx.light.css" />
</head>
<body class="dx-viewport">
<div class="demo-container">
<demo-app>Loading...</demo-app>
</div>
<script src="https://cdn.jsdelivr.net/npm/zone.js@0.16.2/bundles/zone.umd.js"></script>
<script src="./bundle.js" type="module"></script>
</body>
</html>
To define the time zone at the component level, assign an IANA time zone value to the timeZone property.
To modify time zones used for appointments, enable the editing.allowTimeZoneEditing option. Our Scheduler supports different time zones for appointment start and end dates (startDateTimeZone and endDateTimeZone appointment properties).