-
Data Grids / Data Management
-
Data Grid
- Overview
-
Data Binding
-
Filtering
- Sorting
-
Editing
-
Grouping
-
Selection
- Focused Row
- Paging
-
Scrolling
-
Columns
-
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
-
-
Reporting
-
AI-powered Extensions
-
Interaction
-
Report Types
-
Data binding
-
Real-life Reports
-
Layout Features
-
Report Controls
-
Web-specific Features
-
-
Rich Text Editor
- Overview
- Load/Save
- Document Protection
-
Templates
- Autocorrect
-
Customization
- Simple View
-
Spreadsheet
- Overview
-
Open a Document
- Export And Printing
-
Features
-
UI 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
- Speech To Text
- 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
-
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
-
-
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.
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
@model IEnumerable<DevExtreme.NETCore.Demos.Models.Event>
<div class="option">
<span>Office Time Zone</span>
@(Html.DevExtreme().SelectBox()
.Width(240)
.InputAttr("aria-label", "Time Zone")
.ElementAttr("class", "selectBox")
.DisplayExpr("title")
.ValueExpr("id")
.OnValueChanged("onSelectBoxValueChanged")
)
</div>
@(Html.DevExtreme().Scheduler()
.DataSource(Model)
.StartDateExpr("StartDate")
.EndDateExpr("EndDate")
.TextExpr("Text")
.RecurrenceRuleExpr("RecurrenceRule")
.Views(new[] { SchedulerViewType.WorkWeek })
.CurrentView(SchedulerViewType.WorkWeek)
.CurrentDate(new DateTime(2021, 4, 27))
.StartDayHour(8)
.Height(600)
.Editing(e => e.AllowTimeZoneEditing(true))
.ElementAttr("class", "scheduler")
.OnOptionChanged("onSchedulerOptionChanged")
.OnAppointmentFormOpening("onAppointmentFormOpening")
)
<script>
const locations = ["Europe/London", "Europe/Berlin", "Europe/Helsinki"];
const currentDate = new Date(2021, 4, 25);
const getLocations = (date) => DevExpress.utils.getTimeZones(date, locations)
const demoLocations = getLocations(currentDate);
function onSelectBoxValueChanged(e) {
getScheduler().option("timeZone", e.value);
}
function onSchedulerOptionChanged(e) {
if (e.name === "currentDate") {
getSelectBox().option("items", getLocations(e.value));
}
}
function 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();
}
function getSelectBox() {
return $(".selectBox").dxSelectBox("instance");
}
function getScheduler() {
return $(".scheduler").dxScheduler("instance");
}
$(function () {
const selectBox = getSelectBox();
selectBox.option("items", demoLocations);
selectBox.option("value", demoLocations[0].id);
const scheduler = getScheduler();
scheduler.option("timeZone", demoLocations[0].id);
})
</script>
using Microsoft.AspNetCore.Mvc;
using DevExtreme.NETCore.Demos.Models.SampleData;
using DevExtreme.NETCore.Demos.ViewModels;
namespace DevExtreme.NETCore.Demos.Controllers {
public class SchedulerController : Controller {
public ActionResult TimeZonesSupport() {
return View(SampleData.Events);
}
}
}
namespace DevExtreme.NETCore.Demos.Models {
public class Event {
public string Text { get; set; }
public string StartDate { get; set; }
public string EndDate { get; set; }
public string RecurrenceRule { get; set; }
public string StartDateTimeZone { get; set; }
public string EndDateTimeZone { get; set; }
}
}
using System.Collections.Generic;
namespace DevExtreme.NETCore.Demos.Models.SampleData {
public partial class SampleData {
public static readonly IEnumerable<Event> Events = new[] {
new Event {
Text = "Stand-up meeting",
StartDate = "2021-04-26T15:30:00.000Z",
EndDate = "2021-04-26T15:45:00.000Z",
RecurrenceRule = "FREQ=DAILY"
},
new Event {
Text = "Book Flights to San Fran for Sales Trip",
StartDate = "2021-04-28T18:00:00.000Z",
EndDate = "2021-04-28T19:00:00.000Z"
},
new Event {
Text = "New Brochures",
StartDate = "2021-04-30T18:30:00.000Z",
EndDate = "2021-04-30T18:45:00.000Z"
},
new Event {
Text = "Website Re-Design Plan",
StartDate = "2021-04-27T12:30:00.000Z",
EndDate = "2021-04-27T13:30:00.000Z"
},
new Event {
Text = "Book Flights to San Fran for Sales Trip",
StartDate = "2021-04-28T16:00:00.000Z",
EndDate = "2021-04-28T15:00:00.000Z"
},
new Event {
Text = "Prepare 2021 Marketing Plan",
StartDate = "2021-04-26T07:00:00.000Z",
EndDate = "2021-04-26T09:30:00.000Z"
},
new Event {
Text = "Launch New Website",
StartDate = "2021-04-28T08:00:00.000Z",
EndDate = "2021-04-28T10:00:00.000Z"
},
new Event {
Text = "Submit New Website Design",
StartDate = "2021-04-29T09:30:00.000Z",
EndDate = "2021-04-29T11:00:00.000Z"
},
new Event {
Text = "Upgrade Server Hardware",
StartDate = "2021-04-30T06:30:00.000Z",
EndDate = "2021-04-30T08:00:00.000Z"
},
new Event {
Text = "Approve New Online Marketing Strategy",
StartDate = "2021-04-30T11:00:00.000Z",
EndDate = "2021-04-30T12:30:00.000Z"
},
new Event {
Text = "Final Budget Review",
StartDate = "2021-04-27T09:00:00.000Z",
EndDate = "2021-04-27T10:35:00.000Z"
}
};
}
}
.option {
display: flex;
}
.option > span {
display: flex;
align-items: center;
margin-right: 10px;
}
.dx-scheduler {
margin-top: 20px;
}
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).