【发布时间】:2014-08-10 22:13:59
【问题描述】:
我有一个日历,它的第一周从 星期日 开始,到 星期六 结束。
现在我只能禁用日历当月的日子,因为我不知道日历中的第一天和最后一天。
我现在使用的代码非常简单:
private List<DateTime> GetDisabledDates(DateTime fromDate, DateTime toDate){
// right now fromDate and toDate are the start and end days in a month
var disabledDates = SearchDates(fromDate, toDate);
return disabledDates;
}
因此,考虑到这一周从周日开始到周六结束,我需要在日历月中显示第一天和最后一天。
关于如何从特定月份动态获取第一个和最后一个(黄色标记的日期)的任何线索?考虑日历配置?
【问题讨论】:
-
这是 ASP.net 吗? WebForms 还是 MVC?
-
我需要在我的控制器中生成数据。
标签: c# linq asp.net-web-api