Date Range
The Telerik UI for ASP.NET Core Gantt allows you to display tasks only in a specified date range.
For a full example of the date range functionality, refer to the Selected Date Range (Demo).
Configuration
The example below demonstrates how to configure the different views of the Gantt to display the tasks that are within a date range.
@(Html.Kendo().Gantt<TaskViewModel, DependencyViewModel>()
.Name("gantt")
.Views(views =>
{
views.DayView(d => d
.Date(new DateTime(2022, 6, 2))
.Range(r =>
r.Start(new DateTime(2022, 6, 2))
.End(new DateTime(2022, 6, 8))
));
views.WeekView(w => w
.Date(new DateTime(2022, 6, 1))
.Range(r =>
r.Start(new DateTime(2022, 6, 1))
.End(new DateTime(2022, 7, 13))
)
.Selected(true)
);
views.MonthView(m => m
.Date(new DateTime(2022, 5, 18))
.Range(r =>
r.Start(new DateTime(2022, 5, 18))
.End(new DateTime(2022, 8, 3))
));
})
<!-- ...additional Gantt configuration... -->
)