Completed
Last Updated: 19 Jun 2019 10:54 by ADMIN
Release 1.2.0
Darren
Created on: 24 May 2019 04:34
Category: DateInput
Type: Feature Request
14
Binding to nullable value

Binding a date input or a date picker to a nullable value causes a build-time error

error CS1503: Argument 1: cannot convert from 'System.DateTime?' to 'System.DateTime'

Sample:

@using Telerik.Blazor.Components.Button
@using Telerik.Blazor.Components.DateInput

<TelerikDateInput bind-Value="@StartDate" Format="MM/dd/yyyy HH:mm:ss"></TelerikDateInput>

@functions {
    [Parameter]
    private DateTime? StartDate { get; set; } = new DateTime(2020, 1, 1);
}

0 comments