Replacing Calendar control (its events) in asp.net with jQuery calendar?

只谈情不闲聊 提交于 2019-12-11 07:58:02

问题


Earlier Title: How to add a weekly view Calendar stripe in Web Page?

Gridview's data is searched and displayed by week of the year. The weekly view calendar control should look like somewhat the picture shown below. The current month, week and date are highlighted.

Adding a calendar control and calculating the week of the year based on the date user clicked within C# is not an issue. But I need to format calendar control in a such way to highlight current week of the year and provides navigation to next and previous weeks of the year (consecutive).

In ASP.Net page, how can I achieve this?

EDIT [17/07/2014]

After getting some rookie touch on Asp.Net and vee bit of understanding of jQuery, I realized this can be easily achieved via jQuery DatePicker in its UI. However I have couple of questions that need to be addressed while migrating default asp.net Calendar control based code to use jQuery DatePicker.

  1. Is jQuery DatePicker also called as jQuery Calendar?
  2. Can the following events be achieved in 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;
    }
    
  3. Is it possible to get the selected week/date of the jQuery DatePicker into a variable? YES

  4. Will it be an issue changing into jQuery instead of using built in calendar control for application's maintenance purpose.

来源:https://stackoverflow.com/questions/24571944/replacing-calendar-control-its-events-in-asp-net-with-jquery-calendar

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!