【发布时间】:2015-06-15 12:18:32
【问题描述】:
我的页面上有一个下拉列表:-
@Html.DropDownList("dd_dates", new SelectList(@Model.seasonDates), "Please Select")
其中 seasonDates 是日期的 IList。问题是当日期显示在下拉列表中时,它们也有时间。如何格式化显示日期以便不包括时间。
【问题讨论】:
-
你需要在 seasonDates() 函数中这样做
-
它只是视图模型中包含日期列表的属性
标签: date model-view-controller html-select