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.

Copy to CodePen
Apply
Reset
window.onload = function() { var dataSource = new DevExpress.data.DataSource({ store: data, filter: ["startDateTimeZone", locations[0].value] }); var currentLocation = ko.observable(locations[0].value); var timeZone = ko.computed(function(){ var result = currentLocation(); dataSource.filter(["startDateTimeZone", result]); return result; }); var viewModel = { schedulerOptions: { dataSource: dataSource, views: ["workWeek"], currentView: "workWeek", currentDate: new Date(2017, 4, 25), startDayHour: 8, height: 600, timeZone: timeZone, resources: [ { fieldExpr: "startDateTimeZone", valueExpr: "value", dataSource: locations } ], onAppointmentFormCreated: function(e){ e.form.itemOption("startDateTimeZone", { visible: true }); e.form.itemOption("endDateTimeZone", { visible: true }); } }, locationSwitcherOptions: { items: locations, width: 200, value: currentLocation, displayExpr: "text", valueExpr: "value" } }; ko.applyBindings(viewModel, document.getElementById("scheduler-demo")); };
<!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="js/jquery-3.1.0.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/knockout/3.4.0/knockout-min.js"></script> <link rel="stylesheet" type="text/css" href="https://cdn3.devexpress.com/jslib/17.2.3/css/dx.spa.css" /> <link rel="stylesheet" type="text/css" href="https://cdn3.devexpress.com/jslib/17.2.3/css/dx.common.css" /> <link rel="dx-theme" data-theme="generic.light" href="https://cdn3.devexpress.com/jslib/17.2.3/css/dx.light.css" /> <script src="https://cdn3.devexpress.com/jslib/17.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"> <div id="scheduler-demo"> <div data-bind="dxScheduler: schedulerOptions"></div> <div class="options"> <div class="caption">Options</div> <div class="option"> <span>Office Location</span> <div data-bind="dxSelectBox: locationSwitcherOptions"></div> </div> </div> </div> </div> </body> </html>
.options { padding: 20px; background-color: rgba(191, 191, 191, 0.15); margin-top: 20px; } .caption { font-size: 18px; font-weight: 500; } .option { margin-top: 10px; } .option > span { position: relative; top: 2px; margin-right: 10px; } .option > .dx-selectbox { display: inline-block; vertical-align: middle; }
var data = [ { text: "Stand-up meeting", startDate: "2017-05-22T15:30:00.000Z", endDate: "2017-05-22T15:45:00.000Z", recurrenceRule: "FREQ=DAILY", startDateTimeZone: "America/Los_Angeles", endDateTimeZone: "America/Los_Angeles" }, { text: "Website Re-Design Plan", startDate: "2017-05-23T16:30:00.000Z", endDate: "2017-05-23T18:30:00.000Z", startDateTimeZone: "America/Los_Angeles", endDateTimeZone: "America/Los_Angeles" }, { text: "Book Flights to San Fran for Sales Trip", startDate: "2017-05-24T18:00:00.000Z", endDate: "2017-05-24T19:00:00.000Z", startDateTimeZone: "America/Los_Angeles", endDateTimeZone: "America/Los_Angeles" }, { text: "Install New Router in Dev Room", startDate: "2017-05-25T17:00:00.000Z", endDate: "2017-05-25T21:30:00.000Z", startDateTimeZone: "America/Los_Angeles", endDateTimeZone: "America/Los_Angeles" }, { text: "Approve Personal Computer Upgrade Plan", startDate: "2017-05-26T16:00:00.000Z", endDate: "2017-05-26T17:00:00.000Z", startDateTimeZone: "America/Los_Angeles", endDateTimeZone: "America/Los_Angeles" }, { text: "New Brochures", startDate: "2017-05-26T19:30:00.000Z", endDate: "2017-05-26T20:45:00.000Z", startDateTimeZone: "America/Los_Angeles", endDateTimeZone: "America/Los_Angeles" }, { text: "Daily meeting", startDate: "2017-05-22T12:30:00.000Z", endDate: "2017-05-22T12:45:00.000Z", recurrenceRule: "FREQ=DAILY", startDateTimeZone: "America/New_York", endDateTimeZone: "America/New_York" }, { text: "Website Re-Design Plan", startDate: "2017-05-23T13:30:00.000Z", endDate: "2017-05-23T14:30:00.000Z", startDateTimeZone: "America/New_York", endDateTimeZone: "America/New_York" }, { text: "Book Flights to San Fran for Sales Trip", startDate: "2017-05-24T14:00:00.000Z", endDate: "2017-05-24T15:00:00.000Z", startDateTimeZone: "America/New_York", endDateTimeZone: "America/New_York" }, { text: "Install New Router in Dev Room", startDate: "2017-05-25T14:30:00.000Z", endDate: "2017-05-25T17:30:00.000Z", startDateTimeZone: "America/New_York", endDateTimeZone: "America/New_York" }, { text: "Approve Personal Computer Upgrade Plan", startDate: "2017-05-23T15:00:00.000Z", endDate: "2017-05-23T16:00:00.000Z", startDateTimeZone: "America/New_York", endDateTimeZone: "America/New_York" }, { text: "New Brochures", startDate: "2017-05-26T13:30:00.000Z", endDate: "2017-05-26T14:45:00.000Z", startDateTimeZone: "America/New_York", endDateTimeZone: "America/New_York" }, { text: "Upgrade Personal Computers", startDate: "2017-05-26T15:15:00.000Z", endDate: "2017-05-26T16:30:00.000Z", startDateTimeZone: "America/New_York", endDateTimeZone: "America/New_York" }, { text: "Prepare 2017 Marketing Plan", startDate: "2017-05-22T07:00:00.000Z", endDate: "2017-05-22T09:30:00.000Z", startDateTimeZone: "Europe/Berlin", endDateTimeZone: "Europe/Berlin" }, { text: "Launch New Website", startDate: "2017-05-24T08:00:00.000Z", endDate: "2017-05-24T10:00:00.000Z", startDateTimeZone: "Europe/Berlin", endDateTimeZone: "Europe/Berlin" }, { text: "Submit New Website Design", startDate: "2017-05-25T09:30:00.000Z", endDate: "2017-05-25T11:00:00.000Z", startDateTimeZone: "Europe/Berlin", endDateTimeZone: "Europe/Berlin" }, { text: "Upgrade Server Hardware", startDate: "2017-05-26T06:30:00.000Z", endDate: "2017-05-26T08:00:00.000Z", startDateTimeZone: "Europe/Berlin", endDateTimeZone: "Europe/Berlin" }, { text: "Approve New Online Marketing Strategy", startDate: "2017-05-26T11:00:00.000Z", endDate: "2017-05-26T12:30:00.000Z", startDateTimeZone: "Europe/Berlin", endDateTimeZone: "Europe/Berlin" }, { text: "Final Budget Review", startDate: "2017-05-23T09:00:00.000Z", endDate: "2017-05-23T10:35:00.000Z", startDateTimeZone: "Europe/Berlin", endDateTimeZone: "Europe/Berlin" }]; var locations = [{ 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" }];