Last Updated: 25 May 2020 13:31 by ADMIN
Created on: 25 May 2020 11:44
Category: DateInput
Type: Bug Report
DatePicker loses focus when used as data editor in the Grid and the input date starts with 0
DatePicker loses focus when used as data editor in the Grid and the input date starts with 0, for example 05/05/2020. As attached file, you can see a screen recording of the issue.
Attached Files:
Duplicated Items
1 comment
Svetoslav Dimitrov
Posted on: 25 May 2020 13:31


As a workaround, for the time being you can put the DatePicker in an EditorTemplate (more information on EditorTemplate here: https://docs.telerik.com/blazor-ui/components/grid/templates#edit-template).

<TelerikGrid Data="@Data"
        <GridColumn Field="@nameof(MyDataModel.Id)" Title="Id" />
        <GridColumn Field="@nameof(MyDataModel.Name)" Title="Name" />
        <GridColumn Field="@nameof(MyDataModel.DateOfBirth)" Title="DOB" Width="150px">
                    var item = context as MyDataModel;
                    <TelerikDatePicker @bind-Value="@item.DateOfBirth"></TelerikDatePicker>
            <GridCommandButton Command="Edit" Icon="edit">Edit</GridCommandButton>
            <GridCommandButton Command="Save" Icon="save" ShowInEdit="true">Save</GridCommandButton>
            <GridCommandButton Command="Cancel" Icon="cancel" ShowInEdit="true">Cancel</GridCommandButton>

@code {
    public void UpdateHandler(GridCommandEventArgs e)
        var item = e.Item as MyDataModel;

        var index = Data.FindIndex(x => x.Id == item.Id);
        if (index != -1)
            Data[index] = item;

    public List<MyDataModel> Data { get; set; } = Enumerable.Range(1, 20).Select(x => new MyDataModel()
        Id = x,
        Name = $"Name {x}",
        DateOfBirth = DateTime.Today.AddDays(-x).Date

    public class MyDataModel
        public int Id { get; set; }
        public string Name { get; set; }
        public DateTime DateOfBirth { get; set; }

Svetoslav Dimitrov
Progress Telerik

Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
Our thoughts here at Progress are with those affected by the outbreak.