Reputation: 376
I'm trying to set an hour in input date in blazor, but i don't know if it is possible.
My code:
<div class="form-group">
<label for="Validade" class="p-3">Validade</label>
<InputDate @bind-Value:format="dd/MM/yyyy hh:mm:ss" @bind-Value="@InfracaoDto.Validade" />
<ValidationMessage For="@(()=>InfracaoDto.Validade)" />
</div>
Result:
Is there any way of the input get hour, minute and second?
Upvotes: 1
Views: 1590
Reputation: 2825
change
<InputDate @bind-Value:format="dd/MM/yyyy hh:mm:ss" @bind-Value="@InfracaoDto.Validade" />
to
<InputDate Type="InputDateType.DateTimeLocal" @bind-Value:format="dd/MM/yyyy hh:mm:ss" @bind-Value="@InfracaoDto.Validade"/>
Upvotes: 3