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

MinDate & MaxDate not workin in usercontrol

2 Answers 110 Views
Calendar
This is a migrated thread and some comments may be shown as answers.
Jomey
Top achievements
Rank 1
Jomey asked on 07 Apr 2008, 05:24 PM

It only works in my javascript function - Telerik.Web.UI.InputErrorReason.OutOfRange.  But the actual calendar still let's me pick between 1980 and 2099. 

Even though the mindate is set to 01/01/2008 and the maxdate is set to 03/29/2008.  I'm passing 2 parameters/properties into the usercontrol.  

public
DateTime DateFrom

{

get { return this.RadDatePicker1.MinDate; }

set { this.RadDatePicker1.MinDate = value; }

}

public DateTime DateTo

{

get { return this.RadDatePicker1.MaxDate; }

set { this.RadDatePicker1.MaxDate = value; }

}




 

2 Answers, 1 is accepted

Sort by
0
Jomey
Top achievements
Rank 1
answered on 07 Apr 2008, 05:33 PM
It has to do with the DateSharedCalendar property.  With this set.  The mindate and max date values get overwritten even though i pass it to the usercontrol.  With the DateSharedCalendar property not set - it works.
0
Maria Ilieva
Telerik team
answered on 09 Apr 2008, 10:43 AM
Hi Jomey,

This problem could appear if you have several RadDatePickers with different Min/Max date settings and you are using Shared Calendar. Unfortunately, it is not possible to have different Min/MaxDate for RadDatePickers using shared calendar. As you can read from this help article, with shared scenarios you need to set the properties to the external shared calendar as it is only one on the page for all picker instances.

Kind regards,
Maria Ilieva
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
Calendar
Asked by
Jomey
Top achievements
Rank 1
Answers by
Jomey
Top achievements
Rank 1
Maria Ilieva
Telerik team
Share this question
or