Your search did not match any results.
Scheduler

Time Zones Support

Documentation
The Scheduler widget can show appointments in different time zones. The current time zone is specified using the timeZome option is utilized. In this demo, you can change the time zone of an appointment in the appointment details form. To make the time zone selectors visible, the onAppointmentFormCreated is utilized.
Apply
Reset
<div class="locations"> <span>Office Location</span> <dx-select-box [items]="locations" [width]="200" displayExpr="text" valueExpr="value" [(value)]="currentLocation" (onValueChanged)="onValueChanged($event)"> </dx-select-box> </div> <dx-scheduler [dataSource]="dataSource" [timeZone]="currentLocation" [views]="['workWeek']" currentView="workWeek" [startDayHour]="8" [currentDate]="currentDate" [resources]="resources" width="100%" [height]="600" (onAppointmentFormCreated)="onAppointmentFormCreated($event)"> <dxi-resource fieldExpr="startDateTimeZone" valueExpr="value" [dataSource]="locations"> </dxi-resource> </dx-scheduler>
import { NgModule, Component } from '@angular/core'; import { BrowserModule } from '@angular/platform-browser'; import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; import { DxSchedulerModule, DxSelectBoxModule, DxTemplateModule } from 'devextreme-angular'; import { Service, Location } from './app.service'; import DataSource from 'devextreme/data/data_source'; @Component({ selector: 'demo-app', templateUrl: 'app/app.component.html', styleUrls: ['app/app.component.css'], providers: [Service] }) export class AppComponent { dataSource: any; currentDate: Date = new Date(2015, 4, 25); currentLocation: any; locations: Location[]; constructor(service: Service) { this.locations = service.getLocations(); this.currentLocation = this.locations[0].value; this.dataSource = new DataSource({ store: service.getData(), filter: ["startDateTimeZone", this.currentLocation] }); } onAppointmentFormCreated(e) { e.form.itemOption("startDateTimeZone", { visible: true }); e.form.itemOption("endDateTimeZone", { visible: true }); } onValueChanged(e) { this.dataSource.filter(["startDateTimeZone", e.value]); } } @NgModule({ imports: [ BrowserModule, DxSchedulerModule, DxTemplateModule, DxSelectBoxModule ], declarations: [AppComponent], bootstrap: [AppComponent] }) export class AppModule { } platformBrowserDynamic().bootstrapModule(AppModule);
/deep/ .locations { margin-bottom: 10px; } /deep/ .locations > span { position: relative; top: 2px; margin-right: 10px; } /deep/ .locations > .dx-selectbox { display: inline-block; vertical-align: middle; }
import { Injectable } from '@angular/core'; export class Data { text: string; startDate: string; endDate: string; recurrenceRule?: string; startDateTimeZone: string; endDateTimeZone: string } export class Location { value: string; text: string; color: string; } let data: Data[] = [ { text: "Stand-up meeting", startDate: "2015-05-25T15:30:00.000Z", endDate: "2015-05-25T15:45:00.000Z", recurrenceRule: "FREQ=DAILY", startDateTimeZone: "America/Los_Angeles", endDateTimeZone: "America/Los_Angeles" }, { text: "Website Re-Design Plan", startDate: "2015-05-26T16:30:00.000Z", endDate: "2015-05-26T18:30:00.000Z", startDateTimeZone: "America/Los_Angeles", endDateTimeZone: "America/Los_Angeles" }, { text: "Book Flights to San Fran for Sales Trip", startDate: "2015-05-27T18:00:00.000Z", endDate: "2015-05-27T19:00:00.000Z", startDateTimeZone: "America/Los_Angeles", endDateTimeZone: "America/Los_Angeles" }, { text: "Install New Router in Dev Room", startDate: "2015-05-28T17:00:00.000Z", endDate: "2015-05-28T21:30:00.000Z", startDateTimeZone: "America/Los_Angeles", endDateTimeZone: "America/Los_Angeles" }, { text: "Approve Personal Computer Upgrade Plan", startDate: "2015-05-29T16:00:00.000Z", endDate: "2015-05-29T17:00:00.000Z", startDateTimeZone: "America/Los_Angeles", endDateTimeZone: "America/Los_Angeles" }, { text: "New Brochures", startDate: "2015-05-29T19:30:00.000Z", endDate: "2015-05-29T20:45:00.000Z", startDateTimeZone: "America/Los_Angeles", endDateTimeZone: "America/Los_Angeles" }, { text: "Daily meeting", startDate: "2015-05-25T12:30:00.000Z", endDate: "2015-05-25T12:45:00.000Z", recurrenceRule: "FREQ=DAILY", startDateTimeZone: "America/New_York", endDateTimeZone: "America/New_York" }, { text: "Website Re-Design Plan", startDate: "2015-05-26T13:30:00.000Z", endDate: "2015-05-26T14:30:00.000Z", startDateTimeZone: "America/New_York", endDateTimeZone: "America/New_York" }, { text: "Book Flights to San Fran for Sales Trip", startDate: "2015-05-27T14:00:00.000Z", endDate: "2015-05-27T15:00:00.000Z", startDateTimeZone: "America/New_York", endDateTimeZone: "America/New_York" }, { text: "Install New Router in Dev Room", startDate: "2015-05-28T14:30:00.000Z", endDate: "2015-05-28T17:30:00.000Z", startDateTimeZone: "America/New_York", endDateTimeZone: "America/New_York" }, { text: "Approve Personal Computer Upgrade Plan", startDate: "2015-05-26T15:00:00.000Z", endDate: "2015-05-26T16:00:00.000Z", startDateTimeZone: "America/New_York", endDateTimeZone: "America/New_York" }, { text: "New Brochures", startDate: "2015-05-29T13:30:00.000Z", endDate: "2015-05-29T14:45:00.000Z", startDateTimeZone: "America/New_York", endDateTimeZone: "America/New_York" }, { text: "Upgrade Personal Computers", startDate: "2015-05-29T15:15:00.000Z", endDate: "2015-05-29T16:30:00.000Z", startDateTimeZone: "America/New_York", endDateTimeZone: "America/New_York" }, { text: "Prepare 2015 Marketing Plan", startDate: "2015-05-25T07:00:00.000Z", endDate: "2015-05-25T09:30:00.000Z", startDateTimeZone: "Europe/Berlin", endDateTimeZone: "Europe/Berlin" }, { text: "Launch New Website", startDate: "2015-05-27T08:00:00.000Z", endDate: "2015-05-27T10:00:00.000Z", startDateTimeZone: "Europe/Berlin", endDateTimeZone: "Europe/Berlin" }, { text: "Submit New Website Design", startDate: "2015-05-28T09:30:00.000Z", endDate: "2015-05-28T11:00:00.000Z", startDateTimeZone: "Europe/Berlin", endDateTimeZone: "Europe/Berlin" }, { text: "Upgrade Server Hardware", startDate: "2015-05-29T06:30:00.000Z", endDate: "2015-05-29T08:00:00.000Z", startDateTimeZone: "Europe/Berlin", endDateTimeZone: "Europe/Berlin" }, { text: "Approve New Online Marketing Strategy", startDate: "2015-05-29T11:00:00.000Z", endDate: "2015-05-29T12:30:00.000Z", startDateTimeZone: "Europe/Berlin", endDateTimeZone: "Europe/Berlin" }, { text: "Final Budget Review", startDate: "2015-05-26T09:00:00.000Z", endDate: "2015-05-26T10:35:00.000Z", startDateTimeZone: "Europe/Berlin", endDateTimeZone: "Europe/Berlin" }]; let locations: Location[] = [{ value: "America/Los_Angeles", text: "Los Angeles", color: "#1e90ff" }, { value: "America/New_York", text: "New York", color: "#56ca85" }, { value: "Europe/Berlin", text: "Berlin", color: "#ff9747" }]; @Injectable() export class Service { getLocations() { return locations; } getData() { return data; } }
// In real applications, you should not transpile code in the browser. You can see how to create your own application with Angular 2 and DevExtreme here: // https://github.com/DevExpress/devextreme-angular/blob/master/README.md System.config({ transpiler: 'ts', typescriptOptions: { module: "commonjs", emitDecoratorMetadata: true, experimentalDecorators: true }, meta: { 'typescript': { "exports": "ts" } }, paths: { 'npm:': 'https://unpkg.com/' }, map: { 'ts': 'npm:plugin-typescript@4.0.10/lib/plugin.js', 'typescript': 'npm:typescript@2.0.6/lib/typescript.js', '@angular/core': 'npm:@angular/core@2.4.3/bundles/core.umd.js', '@angular/common': 'npm:@angular/common@2.4.3/bundles/common.umd.js', '@angular/compiler': 'npm:@angular/compiler@2.4.3/bundles/compiler.umd.js', '@angular/platform-browser': 'npm:@angular/platform-browser@2.4.3/bundles/platform-browser.umd.js', '@angular/platform-browser-dynamic': 'npm:@angular/platform-browser-dynamic@2.4.3/bundles/platform-browser-dynamic.umd.js', '@angular/http': 'npm:@angular/http@2.4.3/bundles/http.umd.js', '@angular/router': 'npm:@angular/router@3.4.3/bundles/router.umd.js', '@angular/forms': 'npm:@angular/forms@2.4.3/bundles/forms.umd.js', 'rxjs': 'npm:rxjs@5.0.3', 'devextreme': 'npm:devextreme@16.2', 'jquery': 'npm:jquery@3.1.1/dist/jquery.min.js', 'jszip': 'npm:jszip@3.1.3/dist/jszip.min.js', 'devextreme-angular': 'npm:devextreme-angular@16.2' }, packages: { 'app': { main: './app.component.ts', defaultExtension: 'ts' }, 'devextreme': { defaultExtension: 'js' }, 'devextreme-angular': { main: 'index.js', defaultExtension: 'js' } } });
<!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <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=1.0" /> <link rel="stylesheet" type="text/css" href="https://cdn3.devexpress.com/jslib/16.2.5/css/dx.spa.css" /> <link rel="stylesheet" type="text/css" href="https://cdn3.devexpress.com/jslib/16.2.5/css/dx.common.css" /> <link rel="dx-theme" data-theme="generic.light" href="https://cdn3.devexpress.com/jslib/16.2.5/css/dx.light.css" /> <script src="https://unpkg.com/core-js@2.4.1/client/shim.min.js"></script> <script src="https://unpkg.com/zone.js@0.6.25/dist/zone.js"></script> <script src="https://unpkg.com/reflect-metadata@0.1.3/Reflect.js"></script> <script src="https://unpkg.com/systemjs@0.19.31/dist/system.js"></script> <script src="config.js"></script> <script> System.import('app').catch(console.error.bind(console)); </script> </head> <body class="dx-viewport"> <div class="demo-container"> <demo-app>Loading...</demo-app> </div> </body> </html>