Replacing Calendar control (its events) in asp.net

2019-08-14 06:27发布

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?

enter image description here

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.

0条回答
登录 后发表回答