Calendar Control - Programatically set the calendar to a date range

Discussion in 'ASP .Net Web Controls' started by Shevek, Jun 23, 2004.

  1. Shevek

    Shevek Guest

    Hi All, Hope someone can help!

    I am building an Event Calendar app based around the Calendar
    WebControl which builds an SQL string based on the SelectedDates
    property which is passed to Page.StartDate and Page.EndDate
    properties.

    This works nicely and I can select a Day, Week or Month and run my SQL
    against them.

    There is also a shortcuts dropdown to allow the user to select Today,
    Last Month, This Month, Next Month, Next Two Weeks, Next 30 Days, Next
    60 Days, Next 90 Days.

    Again, these all work nicely as I set the Page.StartDate and
    Page.EndDate based on the option and run the SQL then update the
    Calendar.VisibleDate to Page.StartDate.

    The problem is it would be nice for the Calendar object to reflect the
    shortcut ranges. This is OK for Today as I can just set the
    SelectedDate to the Page.StartDate. However the SelectedDates property
    is read only.

    Is there any way to set a range of dates to be selected based on the
    Page.StartDate and Page.EndDate properties?

    Many TIA

    --


    Shevek

    The Poster Previously Known As Moldy
    Shevek, Jun 23, 2004
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Shevek
    Replies:
    3
    Views:
    6,005
    Shevek
    Jun 23, 2004
  2. Peter Grison

    Date, date date date....

    Peter Grison, May 28, 2004, in forum: Java
    Replies:
    10
    Views:
    3,186
    Michael Borgwardt
    May 30, 2004
  3. nicknack

    limit date range with calendar

    nicknack, Mar 11, 2007, in forum: ASP .Net
    Replies:
    2
    Views:
    887
    nicknack
    Mar 12, 2007
  4. Phil Streiff

    Calendar control - date range

    Phil Streiff, Oct 6, 2003, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    261
    Phil Streiff
    Oct 6, 2003
  5. Replies:
    2
    Views:
    283
Loading...

Share This Page