Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

DxSchedulerDateTimeRange.End Property

Specifies the range’s end date.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v24.2.dll

NuGet Package: DevExpress.Blazor

#Declaration

C#
public DateTime End { get; }

#Property Value

Type Description
DateTime

The range’s end date.

#Remarks

The constructor uses the Start and End property values to create an instance of the DxSchedulerDateTimeRange structure. The Start property value should be equal or less than the End property value. Otherwise, an exception is thrown.

The following example gets appointments for the next 24 hours:

Razor
<DxScheduler StartDate="@DateTime.Today"
             DataStorage="@DataStorage">
    <DxSchedulerWorkWeekView ShowWorkTimeOnly="true"></DxSchedulerWorkWeekView>
</DxScheduler>

Number of appointments in the next 24 hours: @AppointmentNum

@code {
    DxSchedulerDataStorage DataStorage = new DxSchedulerDataStorage() {
        AppointmentsSource = AppointmentCollection.GetAppointments(),
        AppointmentMappings = new DxSchedulerAppointmentMappings() {
            Type = "AppointmentType",
            Start = "StartDate",
            End = "EndDate",
            Subject = "Caption",
            AllDay = "AllDay",
            Location = "Location",
            Description = "Description",
            LabelId = "Label",
            StatusId = "Status",
            RecurrenceInfo = "Recurrence"
        }
    };
    int AppointmentNum;
    protected override async Task OnInitializedAsync()
    {
        DxSchedulerDateTimeRange range = new DxSchedulerDateTimeRange(DateTime.Today, DateTime.Today.AddHours(24));
        IEnumerable<DxSchedulerAppointmentItem> appointments = DataStorage.GetAppointments(range);
        AppointmentNum = appointments.Count();
    }
}

Date-Time Range

See Also