Clear RadDatePicker client side min / max dates?

According to the Telerik documentation, in order to configure client capabilities of RadDatePicker or maxdate on the client side, you must use the two methods set_minDate () and set_maxDate () respectively. Initially, I thought that just passing these methods to zero would remove any restrictions on the controls, but that doesn't seem to be the case. Does anyone have experience cleaning these properties for the RadDatePicker client?

Thanks!

+4
source share
1 answer

Definitely do not pass null these methods, you will get a TypeError exception;)

When you omit MinDate and MaxDate from your markup, telerik internally defaults the client to new Date(1980, 0, 1) and new Date(2099, 11, 31) respectively. (Note: this happens in the Telerik.Web.UI.RadDateInput constructor Telerik.Web.UI.RadDateInput ).

So, the trick to “cleaning” these properties is to return them to their default values:

 $find('RadDateTimePicker').set_minDate(new Date(1980, 0, 1)); $find('RadDateTimePicker').set_maxDate(new Date(2099, 11, 31)); 

I know that it is wrong to do so, but this is the method that most closely matches what telerik does anyway. (In addition, telerik will ignore everything you pass to it, for example 0 , null , "" , etc.)

+6
source

All Articles