According to Telerik’s documentation, to set a RadDatePicker’s mindate or maxdate properties client-side, you are to use the two methods set_minDate() and set_maxDate() respectively. I initially thought that simply passing in null into these methods would remove any constraints on the controls, but it does not seem to be the case. Does anyone have experience clearing these properties for the RadDatePicker client-side?
Thanks!
Definitely don’t pass
nullto those methods, you’ll get aTypeErrorexception thrown 😉When you omit
MinDateandMaxDatefrom your markup, telerik internally defaults the client tonew Date(1980, 0, 1)andnew Date(2099, 11, 31)respectively. (Note: this happens in the constructor code ofTelerik.Web.UI.RadDateInput).So the trick to “clearing” those properties is to set them back to those defaults:
I know it feels wrong to do it this way, but it is the method that most closely matches what telerik does internally anyway. (Plus, telerik will ignore anything else you pass to it, eg
0,null,"", etc)