Calendar single day / single week selection

Thread is closed for posting
3 posts, 0 answers
  1. 63F75A2C-1F16-4AED-AFE8-B1BBD57646AD
    63F75A2C-1F16-4AED-AFE8-B1BBD57646AD avatar
    1572 posts
    Member since:
    Oct 2004

    Posted 07 Feb 2007 Link to this post

    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.
  2. 22CAEA31-EF0D-4EBD-8812-178CD0BFB956
    22CAEA31-EF0D-4EBD-8812-178CD0BFB956 avatar
    25 posts
    Member since:
    Oct 2003

    Posted 07 Jun 2007 Link to this post

    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.
  3. FCA2D288-F6EC-4724-BAB8-B03BBE745D7B
    FCA2D288-F6EC-4724-BAB8-B03BBE745D7B avatar
    2363 posts
    Member since:
    Mar 2023

    Posted 08 Jun 2007 Link to this post

    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

This Code Library is part of the product documentation and subject to the respective product license agreement.