Your search did not match any results.
Scheduler

Time Zone Support

The Scheduler allows its users to view appointments in different time zones. Set the timeZone option to specify the current time zone. This option accepts values from the IANA time zone database.

In this demo, you can use the drop-down menu above the Scheduler to choose between the Los Angeles, New York, and Berlin time zones. Note that the time zone offset indicated in the drop-down menu may differ from the applied offset due to daylight saving time.

Users can edit the time zones of individual appointments in the appointment details form. To enable this functionality, set the editing.allowTimeZoneEditing option to true. Information about individual time zones is saved in the startDateTimeZone and endDateTimeZone fields of the appointment data objects.

Copy to CodePen
Apply
Reset
var DemoApp = angular.module('DemoApp', ['dx']); getLocations = (date) => { const timeZones = DevExpress.utils.getTimeZones(date); return timeZones.filter((timeZone) => { return this.locations.indexOf(timeZone.id) !== -1; }); }; DemoApp.controller('DemoController', function DemoController($scope) { $scope.currentDate = new Date(2021, 4, 25); $scope.demoLocations = getLocations(new Date(2021, 4, 25)); $scope.currentLocation = $scope.demoLocations[0].id; $scope.schedulerOptions = { bindingOptions: { timeZone: "currentLocation" }, dataSource: data, views: ["workWeek"], currentView: "workWeek", currentDate: new Date(2021, 4, 25), height: 600, startDayHour: 8, onOptionChanged: (e) => { if(e.name === 'currentDate') { $scope.demoLocations = getLocations(e.value); } }, onAppointmentFormOpening: (e) => { const form = e.form; const startDateTimezoneEditor = form.getEditor('startDateTimeZone'); const endDateTimezoneEditor = form.getEditor('endDateTimeZone'); const startDateDataSource = startDateTimezoneEditor.option('dataSource'); const endDateDataSource = endDateTimezoneEditor.option('dataSource'); startDateDataSource.filter(['id', 'contains', 'Europe']); endDateDataSource.filter(['id', 'contains', 'Europe']); startDateDataSource.load(); endDateDataSource.load(); }, editing: { allowTimeZoneEditing: true } }; $scope.locationSwitcherOptions = { bindingOptions: { value: "currentLocation", items: 'demoLocations' }, displayExpr: "title", valueExpr: "id", width: 240 }; });
<!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" /> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script> <script>window.jQuery || document.write(decodeURIComponent('%3Cscript src="js/jquery.min.js"%3E%3C/script%3E'))</script> <link rel="stylesheet" type="text/css" href="https://cdn3.devexpress.com/jslib/20.2.3/css/dx.common.css" /> <link rel="stylesheet" type="text/css" href="https://cdn3.devexpress.com/jslib/20.2.3/css/dx.light.css" /> <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.16/angular.min.js"></script> <script>window.angular || document.write(decodeURIComponent('%3Cscript src="js/angular.min.js"%3E%3C/script%3E'))</script> <script src="https://cdn3.devexpress.com/jslib/20.2.3/js/dx.all.js"></script> <script src="data.js"></script> <link rel="stylesheet" type="text/css" href="styles.css" /> <script src="index.js"></script> </head> <body class="dx-viewport"> <div class="demo-container" ng-app="DemoApp" ng-controller="DemoController"> <div class="option"> <span>Office Time Zone</span> <div dx-select-box="locationSwitcherOptions"></div> </div> <div dx-scheduler="schedulerOptions"></div> </div> </body> </html>
.option { display: flex; } .option > span { display: flex; align-items: center; margin-right: 10px; } .dx-scheduler { margin-top: 20px; }
var data = [ { text: "Stand-up meeting", startDate: "2021-05-24T15:30:00.000Z", endDate: "2021-05-24T15:45:00.000Z", recurrenceRule: "FREQ=DAILY" }, { text: "Book Flights to San Fran for Sales Trip", startDate: "2021-05-26T18:00:00.000Z", endDate: "2021-05-26T19:00:00.000Z" }, { text: "New Brochures", startDate: "2021-05-28T18:30:00.000Z", endDate: "2021-05-28T18:45:00.000Z" }, { text: "Website Re-Design Plan", startDate: "2021-05-25T12:30:00.000Z", endDate: "2021-05-25T13:30:00.000Z" }, { text: "Book Flights to San Fran for Sales Trip", startDate: "2021-05-26T16:00:00.000Z", endDate: "2021-05-26T15:00:00.000Z" }, { text: "Prepare 2021 Marketing Plan", startDate: "2021-05-24T07:00:00.000Z", endDate: "2021-05-24T09:30:00.000Z" }, { text: "Launch New Website", startDate: "2021-05-26T08:00:00.000Z", endDate: "2021-05-26T10:00:00.000Z" }, { text: "Submit New Website Design", startDate: "2021-05-27T09:30:00.000Z", endDate: "2021-05-27T11:00:00.000Z" }, { text: "Upgrade Server Hardware", startDate: "2021-05-28T06:30:00.000Z", endDate: "2021-05-28T08:00:00.000Z" }, { text: "Approve New Online Marketing Strategy", startDate: "2021-05-28T11:00:00.000Z", endDate: "2021-05-28T12:30:00.000Z" }, { text: "Final Budget Review", startDate: "2021-05-25T09:00:00.000Z", endDate: "2021-05-25T10:35:00.000Z" }]; var locations = ['Europe/London', 'Europe/Berlin', 'Europe/Helsinki'];