0
ASP.NET MVC 5日期不会在Chrome中显示。ASP.NET MVC 5日期将不会显示在Chrome中
应用程序中没有任何文化设置。
如何解决?
的Html
@Html.EditorFor(model => model.Changed,
new
{ htmlAttributes =
new { @class = "form-control", @Value = Model.Changed.ToString("MM/dd/yyyy") } })
模型
[DataType(DataType.Date)]
[DisplayFormat(DataFormatString = "{0:MM/dd/yyyy}", ApplyFormatInEditMode = true)]
public System.DateTime Changed { get; set; }
的[MVC4 DataType.Date EditorFor将不会显示在Chrome日期值,在Internet Explorer精]可能的复制(http://stackoverflow.com/问题/ 12633471/mvc4-datatype-date-editorfor-wont-display-date-value-in-chrome-fine-in-interne) –
@ J.Swietek不,不,不行,人 –
你试图删除DataType属性如链接答案中所述? –