问题描述
我想使用输入类型datetime-local修改模型中的特定日期和时间,但datetime选择器不显示该值。
模型的属性是这样声明的
[displayFormat(DataFormatString = "{0:dd-MM-yyyy HH:mm}",ApplyFormatInEditMode = true)]
public DateTime DateSince { get; set; }
视图中的代码
@Html.EditorFor(model => model.DateSince,new { htmlAttributes = new { @id = "txtDateSince",@class = "form-control datepicker",@type = "datetime-local" } })
在我的情况下,datetime-local输入显示dd-MM-yyyy HH:mm为默认格式。
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)