Why is my date input not reading the model value?

后端 未结 2 843
不思量自难忘°
不思量自难忘° 2020-12-21 06:14

I\'m a server side guy trying to teach myself a bit of CSS, Javascript, jQuery etc. I have written a little test project that loads up a model and displays the values in si

2条回答
  •  礼貌的吻别
    2020-12-21 06:53

    Try this:

    <%= Html.TextBoxFor(m => m.Date, new { @type = "date", @id = "ondate", @value = Model.Date.ToString("mm/dd/yyyy") })%>
    

提交回复
热议问题