This is a migrated thread and some comments may be shown as answers.

Problem setting RangeMinDate to earlier date

3 Answers 56 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
Darren Ratcliffe
Top achievements
Rank 1
Darren Ratcliffe asked on 06 Oct 2008, 09:10 AM
Hello all

I've got a really strange problem with the RadCalendar control  (v. 2008.1.415.20) and  was hoping somebody could help me.

When a date is selected from a drop-down menu, there is an autopostback that sets the minimum date to equal the date in my drop-down.

i.e:     rcSelect.RangeMinDate = DateTime.Parse(lstDate.SelectedValue);

If I select January 2009, I can then select February 2009 and so on, but I can't select a date from an earlier date - i.e. November 2008.

Does anyone have an idea why this is?   All I want to do is make the month on the calendar match the month in the dropdown.

You can see what I mean here:

http://www.freedhome.co.uk/availability/

Best regards

Darren

3 Answers, 1 is accepted

Sort by
0
Todd Anglin
Top achievements
Rank 2
answered on 06 Oct 2008, 07:27 PM
Darren-

The RadCalendar is actually performaing exactly to the API. :) The "RangeMinDate" property sets the oldest date allowed for selection in the RadCalendar. Dates older than the RangeMinDate cannot be selected (just as dates above RangeMaxDate cannot be selected, either). See the API ref here:


I'd suggest you use the Calendar's FocusedDate if all you're trying to do is change the focus of the Calendar:


For top performance, though, I'd also encourage you to use the RadCalendar's client-side API in conjunction with RadCombobox's client-side API to avoid the need for a postback to change the calendar's focus. You can see the client-side API in action here:


Hope that helps.

-Todd
0
Darren Ratcliffe
Top achievements
Rank 1
answered on 07 Oct 2008, 07:28 AM
Thanks very much for that Todd, I did suspect that I was using the wrong function - I'll get that in place now :)

Also do you know if it is possible to set the number of days that are highlighted when you hover over the calendar?  i.e. Three days instead of just the one.

Best regards and many thanks

Darren
0
Daniel
Telerik team
answered on 09 Oct 2008, 10:08 AM
Hello Darren,

There is similar code-library project which can help you to realize such a functionality.
Highlight the entire week on single date mouse hover

Regards,
Daniel
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Calendar
Asked by
Darren Ratcliffe
Top achievements
Rank 1
Answers by
Todd Anglin
Top achievements
Rank 2
Darren Ratcliffe
Top achievements
Rank 1
Daniel
Telerik team
Share this question
or