How could I put Default value in a Html.EditorFor
?
Understanding my code,
I have a field that is a filter when I click on EditorFor
opens the calendar, I would like the datetime.now
to appear but only visual without doing the filter.
If I put in the model (get; set) I can show more by doing the filter.
Code used.
@Html.EditorFor(model => model.ModelPaging.Filter.dataInicioIndicadores)
I've tried it that way.
@Html.EditorFor(model => model.ModelPaging.Filter.dataInicioIndicadores, new { htmlAttributes = new { @Value = ViewBag.DataAtual} })
@Html.EditorFor(model => model.ModelPaging.Filter.dataInicioIndicadores, new { @Value = ViewBag.DataAtual})
Does anyone know a way to pass the default value?