Skip Navigation LinksHome / Community & Support / Code Library / ASP.NET and ASP.NET AJAX > Calendar > Calendar single day / single week selection

Calendar single day / single week selection

Feed from this thread
  • Posted on Feb 7, 2007 (permalink)

    Requirements

    RadCalendar for ASP .NET version

    RadControls for ASP .NET AJAX version

    2.x and later



    2008.1.415 and later


    .NET version

    2.0 (RadCalendar for ASP .NET)


    2.0 and later (RadControls for ASP .NET AJAX)


    Visual Studio version

    2005/2008 (RadCalendar for ASP .NET)


    2005 and later(RadControls for ASP .NET AJAX)

    programming language

    C#, VB.Net, JavaScript
    browser support

    all supported by RadCalendar for ASP .NET

    all browsers supported by RadControls for ASP .NET AJAX


     
    PROJECT DESCRIPTION
    The project demonstrates how you can achieve selecting only of a day or a week with RadCalendar. It consists of three pages, covering the different calendar modes:

    - ClientSide.aspx - when the calendar works in client-side mode (AutoPostBack="false"). On every click (a day or a row header) we need to clear the previous selected date(s) and select only the desired one(s) (a clicked day or a corresponding week days) as we use the OnDateClick and OnRowHeaderClick client-side events for that.

    - ServerSideCS.aspx - when the calendar is making postback requests on every selection (AutoPostBack="true"). Concerning the selection mechanism (first the date selection is performed on the client and then a postback to the server is triggered) we process the proper day(s) selection in the SelectionChanged server-side event depending on the number of the days in the SelectedDates collection.

    - ServerSideVB.aspx - the same as the above one in VB.Net code

    There are a lot of comments in the pages code for detailed description of the project work.

  • Terry Rooks avatar

    Posted on Jun 7, 2007 (permalink)

    great example. one quick request if possible...

    how would I need to modify the code so that no matter what, at the end of the logic I always have a start & end date available, even if they are the same (e.g. one day).

    I've tried but are having some difficulties getting it to work correctly.

    My goal would be to implement this code so that someone could view db entries either for a single day or for an entire week, so no matter which way they click around the dates (from day to week, back to a day, etc.) I would have two dates (start & end date) that I can pass to my DB.

    Many thanks.

  • Giuseppe Giuseppe admin's avatar

    Posted on Jun 8, 2007 (permalink)

    Hello Mike,

    Please review the attached modified code that achieves the desired functionality.

    Hope this helps.


    All the best,
    Manuel
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center

Back to Top

Skip Navigation LinksHome / Community & Support / Code Library / ASP.NET and ASP.NET AJAX > Calendar > Calendar single day / single week selection