Set Min/ Max Date for RadInputManager

2 posts, 0 answers
  1. Philip
    Philip avatar
    21 posts
    Member since:
    Nov 2008

    Posted 17 Sep 2009 Link to this post

    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.
  2. Dimo
    Admin
    Dimo avatar
    8450 posts

    Posted 18 Sep 2009 Link to this post

    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.
Back to Top