Display a formatted date in a TextBoxFor()

前端 未结 6 1729
长情又很酷
长情又很酷 2020-12-04 18:52

I\'m using MVC4 and Entity Framework to develop an intranet web app. I have a list of persons which I can edit. When I access the edit view, in the textbox \"Start date\", t

6条回答
  •  我在风中等你
    2020-12-04 19:18

    The top easy for me , was adding the type attribute,

    @Html.EditorFor(model => model.FechaRegistro, new { htmlAttributes = new { @class = "form-control oso" ,@type = "date"  } })
    

提交回复
热议问题