Last Updated: 01 May 2020 07:22 by ADMIN
Created on: 20 Feb 2020 09:16
Category: DatePicker
Type: Bug Report
Deleting the date with the keyboard when bound to non-nullable DateTime leaves incorrect validation messages and state after a valid date is selected

Delete the input, choose a date from the dropdown. The issue is that the first picker remains invalid, while it is valid, a keyboard interaction with the input is required to clear the invalid state.


@using System.ComponentModel.DataAnnotations;

    <EditForm Model="ModelData">
        <DataAnnotationsValidator />
        <ValidationSummary />
        <br /><br />
        <span>Not nullable</span> @ModelData.Date<br />
        <Telerik.Blazor.Components.TelerikDatePicker @bind-Value="ModelData.Date" Min="DateTime.MinValue" Max="DateTime.MaxValue"></Telerik.Blazor.Components.TelerikDatePicker><br /><br />
        <span>Nullable</span> @ModelData.Date2<br />
        <Telerik.Blazor.Components.TelerikDatePicker @bind-Value="ModelData.Date2" Min="DateTime.MinValue" Max="DateTime.MaxValue"></Telerik.Blazor.Components.TelerikDatePicker><br /><br />

@code  {

    public MyModel ModelData { get; set; }

    protected override void OnInitialized()
        ModelData = new MyModel();

    public class MyModel
        public string Name { get; set; }

        [Required(ErrorMessage = "Non nullable required")]
        public DateTime Date { get; set; } = DateTime.Today;

        [Required(ErrorMessage = "Nullable required")]
        public DateTime? Date2 { get; set; } = DateTime.Today;

This item is a duplicate of an already existing item. You can find the original item here:
1 comment
Marin Bratanov
Posted on: 01 May 2020 07:22

Hi Robert,

This one somehow fell through the cracks when updating statuses, I think we fixed it for 2.9.0 as part of the following one so I am marking this as a duplicate: https://feedback.telerik.com/blazor/1456610-unexpected-years-validation-behavior-on-keyboard-input. If you keep having issues with this, let's look into them further.


Marin Bratanov
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.