Skip to main content

DxSchedulerDateTimeRange.End Property

Specifies the range’s end date.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v24.1.dll

NuGet Package: DevExpress.Blazor

Declaration

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 shows how to get appointments for the next 24 hours:

<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