telerik / kendo-ui-core

An HTML5, jQuery-based widget library for building modern web apps.
http://www.telerik.com/kendo-ui
Other
2.54k stars 1.9k forks source link

DateRangePicker cannot be initialized with a null End value #7963

Closed IvanDanchev closed 1 week ago

IvanDanchev commented 2 months ago

Bug report

There is a difference in behavior between the wrappers (MVC and Core) and the Kendo UI for jQuery DateRangePicker. See the following dojo example, which shows initializing the component with a null value for the End date: https://dojo.telerik.com/IkAMUJoG/2

In contrast, the MVC and Core helpers display the Start value as End value.

Reproduction of the problem

  1. Run this REPL: https://netcorerepl.telerik.com/GoaDYoFu45uqxdEF31

Current behavior

The End value is the same as the Start value.

Expected/desired behavior

The End value is null.

Consider also the scenario, where the Range configuration is not set and the component gets the Start and End values from the model, and the value of the EndDate field is null:

@(Html.Kendo().DateRangePickerFor(m => m.StartDate, m => m.EndDate )
    .Name("dateRangePicker")
)

Environment