Calendar Control - Programatically set the calendar to a date range

S

Shevek

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,731
Messages
2,569,432
Members
44,834
Latest member
BuyCannaLabsCBD

Latest Threads

Top