MVC时间格式化

[DisplayFormat(ApplyFormatInEditMode = true, DataFormatString = "{0:yyyy-MM-dd}")]
public DateTime ContractDate { get; set; }
@Html.TextBoxFor(model => model.ContractDate, "{0:yyyy-MM-dd}", new { @class = "Wdate", onclick = "WdatePicker()" })

 

posted @ 2016-11-10 19:39  Kyrie.Xu  阅读(264)  评论(0编辑  收藏  举报