DxSchedulerDateTimeRange.End Property
In This Article
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 |
---|---|
Date |
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();
}
}
See Also