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

Set Min/ Max Date for RadInputManager

1 Answer 64 Views
Input
This is a migrated thread and some comments may be shown as answers.
Philip
Top achievements
Rank 1
Philip asked on 17 Sep 2009, 06:06 PM
Is there a way to set min and max date of the DateInputSetting on the RadInputManager from the server-side? We have are building an application that requires these settings to be dynamic. Or is this entirely on the client-side? Or should I just stick with RadDateInputs to make this work? Can you link some sample codes? Thanks.

1 Answer, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 18 Sep 2009, 01:38 PM
Hi Philip,

You can set MinDate and MaxDate both programmatically and declaratively.


<telerik:RadInputManager ID="RadInputManager1" runat="server"
    <telerik:DateInputSetting BehaviorID="DateInputSetting1" MinDate="..." MaxDate="..."
        <TargetControls> 
            <telerik:TargetInput ControlID="TextBox1" /> 
        </TargetControls> 
    </telerik:DateInputSetting> 
</telerik:RadInputManager> 



C#

protected void Page_Load(object sender, EventArgs e) 
    DateInputSetting dis = RadInputManager1.GetSettingByBehaviorID("DateInputSetting1"as DateInputSetting; 
    dis.MinDate = DateTime.Now; 
    dis.MaxDate = DateTime.Now.AddDays(7); 


Regards,
Dimo
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
Input
Asked by
Philip
Top achievements
Rank 1
Answers by
Dimo
Telerik team
Share this question
or