DateInput Integration
The DatePicker provides integration options with the Telerik UI for ASP.NET MVC DateInput for the input element it renders.
To use the DateInput in a DatePicker, enable the DateInput
property of the DatePicker.
@(Html.Kendo().DatePicker()
.Name("datepicker")
.DateInput()
.Value("10/10/2019")
)
To customize the placeholders of the DateInput use the Messages
configuration and set the desired DateInput message. The component also provides the Format()
option that you can leverage to set the date format, which will be used to parse and format the machine date. Defaults to CultureInfo.DateTimeFormat.ShortDatePattern
.
AutoFill Functionality
With the DateInput integration enabled, you can set the AutoFill()
option.
When the AutoFill
functionality is enabled, you can complete any of the date segments in the DateInput, and when the DatePicker loses focus, the rest of the date will be filled automatically with the corresponding segment of the current date. For example, if the current date is 06 Jul 2023 and you enter only the day portion as 15 and click on another input element, the date will be autofilled to 15 Jul 2023.
@(Html.Kendo().DatePicker()
.Name("datepicker")
.DateInput()
.AutoFill()
)