4
我正在使用剃须刀查看页面和日期时间字段中我想要显示占位符,它显示在Firefox中但不显示在铬显示 - mm/dd/yyyy
。占位符不在铬中工作
她的是我的代码 -
@Html.EditorFor(model => model.Date, new { htmlAttributes = new { @class = "form-control form-inline", @placeholder = "Date must be today's or past date" } })
我怎样才能解决这个问题?
铬只允许“国际”日期格式。您的占位符需要为“YYYY/MM/DD”。此外,您只需使用'@'运算符来转义保留字(如'class') - 占位符不需要它。请参阅http://stackoverflow.com/questions/7372038/is-there-any-way-to-change-input-type-date-format –