How do I bind input of type time with Blazor?

Platform: Blazor| Category : Data binding, Event handling

You can  bind an input of type time in Blazor by using the @bind property to the time value and @bind:format property to specify the supported time format in the DOM input element.

Refer to the following code sample.

<input type="time" @bind="SomeTime" @bind:format="HH:mm"/>

@code {
    public DateTime SomeTime = new DateTime();
}

Share with

Related FAQs

Couldn't find the FAQs you're looking for?

Please submit your question and answer.