在我的模型显示仅日期我有属性格式:在Razor视图
public DateTime CreatedFrom { get; set; }
在强类型的视图我怎么显示日期和使其可编辑(但只有日期,没有时间)。 我使用:
@Html.EditorFor(m=>m.CreatedFrom.ToShortDateString())
当我想要去那个观点例外occures:
Templates can be used only with field access, property access, single-dimension array index, or single-parameter custom indexer expressions.
怎么做是正确的?