我目前正在学习ASP.NET MVC,我已经关注了Stephen Walther的教程: ASP.NET MVC提示#36–创建一个弹出日历助手

日历正常,但我想将日期格式更改为dd / mm / yyyy。

您还可以在顶部添加箭头,以便日历可以按年份和月份更改吗?

有帮助吗?

解决方案

我知道这可能是出于学习目的,但已经存在一个很好的解决方案: JQuery UI Datepicker

其他提示

index.cs

[DataType(DataType.Date)]
public string StartDate { get; set; }

index.cshtml

@Html.EditorFor(m => m.StartDate)
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top