Your search did not match any results.
Scheduler

Adaptability

When the adaptivityEnabled option is set to true, the Scheduler adapts to small screens as follows:

  • Cell overflow indicators become larger to accommodate touch gestures.
  • The appointment list slides from the edge of the screen.
  • Users can click a floating action button to add new appointments.
  • The appointment details form occupies the entire screen.
@model DevExtreme.NETCore.Demos.ViewModels.AdaptabilityAppointmentViewModel @(Html.DevExtreme().Scheduler() .ID("scheduler") .DataSource(Model.Appointments) .Views(new[] { SchedulerViewType.Week, SchedulerViewType.Month }) .CurrentView(SchedulerViewType.Month) .CurrentDate(new DateTime(2017, 5, 25)) .AdaptivityEnabled(true) .StartDayHour(9) .Resources(res => { res.Add() .FieldExpr("PriorityId") .ValueExpr("Id") .ColorExpr("Color") .Label("Priority") .DisplayExpr("Text") .AllowMultiple(true) .DataSource(Model.Priorities); }) .Height(590) .TextExpr("Text") .StartDateExpr("StartDate") .EndDateExpr("EndDate") .RecurrenceRuleExpr("RecurrenceRule") .AllDayExpr("AllDay") ) @(Html.DevExtreme().SpeedDialAction() .ID("speedDialAction") .Icon("plus") .OnClick(@<text> function() { getSchedulerInstance().showAppointmentPopup(); } </text>) ) <script> function getSchedulerInstance() { return $("#scheduler").dxScheduler("instance"); } </script>
using DevExtreme.NETCore.Demos.Models.SampleData; using DevExtreme.NETCore.Demos.ViewModels; using Microsoft.AspNetCore.Mvc; using System; using System.Collections.Generic; using System.Linq; namespace DevExtreme.NETCore.Demos.Controllers { public class SchedulerController : Controller { public ActionResult Adaptability() { return View(new AdaptabilityAppointmentViewModel { Appointments = SampleData.AdaptabilityAppointments, Priorities = SampleData.PriorityResources }); } } }
using System; using System.Collections.Generic; using System.Linq; namespace DevExtreme.NETCore.Demos.Models { public class AdaptabilityAppointment { public string Text { get; set; } public DateTime StartDate { get; set; } public DateTime EndDate { get; set; } public string RecurrenceRule { get; set; } public bool? AllDay { get; set; } public int? PriorityId { get; set; } } }
using System; using System.Collections.Generic; namespace DevExtreme.NETCore.Demos.Models.SampleData { public partial class SampleData { public static readonly IEnumerable<AdaptabilityAppointment> AdaptabilityAppointments = new[] { new AdaptabilityAppointment { Text = "Website Re-Design Plan", StartDate = new DateTime(2017, 5, 1, 9, 30, 0), EndDate = new DateTime(2017, 5, 1, 11, 30, 0), RecurrenceRule = "FREQ=WEEKLY;BYDAY=MO,FR;WKST=TU;INTERVAL=2;COUNT=32" }, new AdaptabilityAppointment { Text = "Book Flights to San Fran for Sales Trip", StartDate = new DateTime(2017, 5, 1, 9, 30, 0), EndDate = new DateTime(2017, 5, 1, 11, 30, 0), RecurrenceRule = "FREQ=WEEKLY;BYDAY=MO,FR;INTERVAL=4;COUNT=32", AllDay = true, PriorityId = 1 }, new AdaptabilityAppointment { Text = "Install New Router in Dev Room", StartDate = new DateTime(2017, 5, 1, 9, 30, 0), EndDate = new DateTime(2017, 5, 1, 11, 30, 0), RecurrenceRule = "FREQ=WEEKLY;BYDAY=FR;INTERVAL=2;COUNT=32" }, new AdaptabilityAppointment { Text = "Approve Personal Computer Upgrade Plan", StartDate = new DateTime(2017, 5, 10, 10, 0, 0), EndDate = new DateTime(2017, 5, 10, 11, 0, 0), RecurrenceRule = "FREQ=WEEKLY;BYDAY=WE;INTERVAL=2;COUNT=32", PriorityId = 2 }, new AdaptabilityAppointment { Text = "Final Budget Review", StartDate = new DateTime(2017, 5, 25, 12, 0, 0), EndDate = new DateTime(2017, 5, 25, 13, 35, 0) }, new AdaptabilityAppointment { Text = "New Brochures", StartDate = new DateTime(2017, 5, 25, 14, 30, 0), EndDate = new DateTime(2017, 5, 25, 15, 45, 0) }, new AdaptabilityAppointment { Text = "Install New Database", StartDate = new DateTime(2017, 5, 25, 9, 45, 0), EndDate = new DateTime(2017, 5, 25, 11, 15, 0) }, new AdaptabilityAppointment { Text = "Approve New Online Marketing Strategy", StartDate = new DateTime(2017, 5, 25, 12, 0, 0), EndDate = new DateTime(2017, 5, 25, 14, 0, 0) }, new AdaptabilityAppointment { Text = "Upgrade Personal Computers", StartDate = new DateTime(2017, 5, 25, 15, 15, 0), EndDate = new DateTime(2017, 5, 25, 16, 30, 0) }, new AdaptabilityAppointment { Text = "Upgrade Personal Computers", StartDate = new DateTime(2017, 5, 26, 15, 15, 0), EndDate = new DateTime(2017, 5, 26, 16, 30, 0) } }; } }
using System; using System.Collections.Generic; using System.Linq; namespace DevExtreme.NETCore.Demos.Models { public class AdaptabilityAppointmentsResource { public int Id { get; set; } public string Text { get; set; } public string Color { get; set; } } }
using System; namespace DevExtreme.NETCore.Demos.Models.SampleData { public class PriorityResource { public int Id { get; set; } public string Text { get; set; } public string Color { get; set; } } }
using System; using System.Collections.Generic; using System.Linq; namespace DevExtreme.NETCore.Demos.Models.SampleData { public partial class SampleData { public static readonly IEnumerable<PriorityResource> PriorityResources = new[] { new PriorityResource { Id = 1, Text = "High priority", Color = "#cc5c53" }, new PriorityResource { Id = 2, Text = "Low priority", Color = "#ff9747" } }; } }