html - MVC 在视图中更改日期类型
问题描述
我想将该日期类型更改为月/年。我该怎么做 ?
public Nullable<System.DateTime> Month { get; set; }
<div class="form-group">
@Html.LabelFor(m => m.Month, new { @class = "control-label col-sm-3" })
<div class="col-sm-9 input-group date">
@Html.EditorFor(model => model.Month, new { htmlAttributes = new { @class = "form-control input-circle " } })
@Html.ValidationMessageFor(model => model.Month, "", new { @class = "text-danger " })
</div>
</div>
解决方案
推荐阅读
- python - PointNet的标签文件
- snowflake-cloud-data-platform - Snowflake UI 下载结果的 CSV 格式不会将带有换行符的值括在引号中
- excel - 在 vba 中为用户定义的类型创建属性
- html - 如何将轮播滑块与不是 Blazor 主页的其他页面隔离开来
- android - 如何在横向上启用沉浸式模式
- python - 如何从网络上的 url 抓取数据?
- ruby-on-rails - 嵌套对象数组中 JSONB 'where' 多个搜索词的 Rails
- javascript - 在Javascript中删除不需要的对象键和未定义?
- javascript - 打字稿看不到来自 try/catch 的返回值
- mysql - 将数据库中的模式导入 HCL OneTest 数据项目时,可以导入的表的数量是否有限制?