之前标题:如何在网页中添加每周视图日历条带?
Gridview 的数据按一年中的搜索和显示。每周视图日历控件应该看起来像下面显示的图片。当前月份,周和日期会突出显示。
添加日历控件并根据用户在C#中单击的日期计算一年中的一周不是问题。但是我需要以这种方式格式化日历控制以突出显示当年的当前周,并提供导航到一年中的下一周和前几周(连续)。
在ASP.Net页面中,我该如何实现?
在获得一些关于Asp.Net的新手,并对jQuery有点了解之后,我意识到这可以通过其UI中的jQuery DatePicker
轻松实现。但是,当迁移基于默认asp.net Calendar控件的代码以使用jQuery DatePicker 时,我需要解决几个问题。
可以在jQuery DatePicker中实现以下事件吗?
//event
protected void Calendar1_SelectionChanged(object sender, EventArgs e)
{
ShowData("a");
}
//method is used with page load event to get the data for current week (default)
Calendar1.SelectedDate
//event - user can only select a particular week, not the single date
protected void Calendar1_DayRender(object sender, DayRenderEventArgs e)
{
e.Day.IsSelectable = false;
}
Is it possible to get the selected week/date of the jQuery DatePicker into a variable? YES