New to Telerik UI for ASP.NET Core? Download free 30-day trial

Interval

The Telerik UI for ASP.NET Core DateTimePicker allows you to specify the time interval between the values in the time view of the popup list.

Depending on the Component Type, you can set the interval in two distinct ways.

Setting the Interval in Classic Render Mode

When the ComponentType() method is set to classic, the interval is specified in minutes (numeric values).

    @(Html.Kendo().DateTimePicker
        .Name("datetimepicker")
        .ComponentType("classic")
        .Interval(7)
    )
    <kendo-datetimepicker name="datetimepicker" 
                      component-type="classic"
                      interval="7">
    </kendo-datetimepicker>

When the ComponentType() is set to classic, the interval does not accept an object of hours, minutes, and seconds.

Setting the Interval in Modern Render Mode

When the ComponentType() method is set to modern, the interval is specified as an object of hours, minutes, and seconds.

    @(Html.Kendo().DateTimePicker()
        .Name("datetimepicker")
        .Interval(interval => interval
            .Second(15)
            .Minute(5)
            .Hour(7)
        )
    )
    <kendo-datetimepicker name="datetimepicker">
        <interval-settings second="15" minute="5" hour="7" />
    </kendo-datetimepicker>

When the ComponentType() is set to modern, the interval does not accept a single numerical value.

See Also

In this article