I have the following code in code behind page. The rdpDate is a date picker. The code does not seem to take effect as in the entry mode it allows to select earlier than the mindate and also the later than the maxdate?
If Not currProject.ProjectStart = Nothing Then
rdpDate.MinDate = currProject.ProjectStart
End If
If Not currProject.ProjectEnd = Nothing Then
rdpDate.MaxDate = currProject.ProjectEnd
End If
Here is the aspx control defination:
<
telerik:RadDatePicker ID="rdpDate" runat="server" DateInput-CausesValidation="true"
SkinID="dpRegular">
</telerik:RadDatePicker>
Thanks,
Sanjay
8 Answers, 1 is accepted

I am not familiar with the issue that you are facing. In which event you are setting the MinDate and MaxDate properties? I tried in Page_Load and that worked well for me.
Code:
protected
void
Page_Load(
object
sender, EventArgs e)
{
rdpDate.MinDate = DateTime.Now.Date;
// Example
}
Also check whether you are getting correct values in Date format - currProject.ProjectStart and currProject.ProjectEnd.
-Shinu

Find attached a small runnable application which uses your settings and works correctly on my side. Test it locally and let me know what the difference in your case is.
Greetings,
Maria Ilieva
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
Find attached a small runnable application which uses your settings and works correctly on my side. Test it locally and let me know what the difference in your case is.
Greetings,
Maria Ilieva
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

I can reproduce my issue with your code if I have the MaxDate set (tested 1/1/2100) in the control code of the aspx page. When the MaxDate is changed in the code behind, It updates the MaxDate for the calendar, but the textbox part still uses the old limit.
Mike Dennis
Note that it is not a correct scenario to set the Min or Max date properties in mark up and code behind at the same time. I would suggest you to use just one way for setting the properties so they would be correctly applied.
Best wishes,
Maria Ilieva
the Telerik team
Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

I think there had been a reason why I needed to have it in both places, but I guess I will have to handle that all in the code behind then.. It seems like that would be considered a bug though, since it partially works (calendar, not input).
Mike Dennis
We will log this behaviour in our system and will proceed with some additional tests for the control in order to isolate if the problem is a bug and if possible fix is available.
Thank you for bringing this to our attention.
Kind regards,
Maria Ilieva
the Telerik team
Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!