ASP.NET Core MVC Controls | ComponentOne
Working with Controls / Input Controls / InputDateRange Overview / Day Range
In This Topic
    Day Range
    In This Topic

    InputDateRange lets you to customize the dropdown calendar to show a limited set of days in the visible calendar month(s) and restrict the selection to the specified range of dates from the calendar. This can be done using the RangeMin and RangeMax properties. The RangeMin and RangeMax properties allow you to limit the minimum and maximum number of days to be displayed in the selected date range at runtime, respectively.

    The following code uses the RangeMin and RangeMax properties to display a minimum three days and maximum five days in the selected date range in the control:

    C#
    Copy Code
    @{
        var today = DateTime.Now.Date;
        var rangeEnd = today.AddDays(3);
    }
    
    <c1-input-date-range id="demoControl" value="@today" range-end="@rangeEnd" close-on-selection="false" selection-mode="Range" range-min="3" range-max="5" placeholder="Enter no.of days for the range">
    </c1-input-date-range>