I'm tried to set a hour in input date in blazor, but i don't know if it is possible.
My code:
<div >
<label for="Validade" >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?
CodePudding user response:
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"/>