DateTimePicker TagHelper Overview

The Telerik UI DateTimePicker TagHelper for ASP.NET Core is a server-side wrapper for the Kendo UI DateTimePicker widget.

The DateTimePicker allows the user to select a value from a calendar, a time drop-down list, or through direct input.

Telerik UI for ASP.NET Core Ninja image

The DateTimePicker is part of Telerik UI for ASP.NET Core, a professional grade UI library with 110+ components for building modern and feature-rich applications. To try it out sign up for a free 30-day trial.

Initializing the DateTimePicker

The following example demonstrates how to define the DateTimePicker by using the DateTimePicker TagHelper.

    <kendo-datetimepicker name="timepicker1"></kendo-datetimepicker>

Basic Configuration

The DateTimePicker TagHelper configuration options are passed as attributes of the tag.

                .Events(e => e.Change("endChange"))
        <kendo-datetimepicker name="end" value="DateTime.Today"
            min="DateTime.Today" on-change="endChange">

The ParseFormats option is of type string[] and can be assigned either by a ViewBag property or by a property of the model.

        ViewBag.ParseDates = new string[] { "MMMM yyyy", "MMMM" };

    <kendo-datetimepicker name="datetimepicker" parse-formats="ViewBag.ParseDates"></kendo-datetimepicker>

See Also

In this article
Not finding the help you need? Improve this article