我有一个使用 JQuery Mobile 的 MVC 4 网站。我正在使用带有 EditorFor 的模型来呈现日期编辑器。在 MVC 中我有这个:
@Html.EditorFor(Function(model) model.ActionDate)
模型属性定义为:
<Required>
<RegularExpression("\d{2}/\d{2}/\d{4}", ErrorMessage:="Please enter a date in the format of MM/DD/YY")>
<DataType(DataType.Date)>
<DisplayFormat(ApplyFormatInEditMode:=True, DataFormatString:="MM/dd/yyyy")>
<Display(Name:="Action Date")>
Public Property ActionDate As Date
它呈现具有以下值的 HTML:
<input type="date" ... value="04/24/2013" />
但是向用户显示的是:
日期对用户不可见,并且 4/24/2013 不是 Chrome 日期选择器的默认值。如何让 chrome 真正显示日期?
谢谢。
最佳答案
关于asp.net - JQuery Mobile 日期选择器不在 Chrome 中显示日期,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19460833/