Trying to set calendar date = today or greater

3 posts, 0 answers
  1. Kath
    Kath avatar
    2 posts
    Member since:
    May 2012

    Posted 18 Feb 2013 Link to this post

    Requirements

    RadControls  version UI_2012_3_1308
    .NET version 3.5
    Visual Studio version 2012
    programming language c#
    browser support

    all browsers supported by RadControls


    PROJECT DESCRIPTION
    I have a rad date picker I want to disable any date from being selected if before today's date previously I have used 
    <asp:CompareValidator ID="vldcmpDateGreaterThan" runat="server" ControlToValidate="txtDate"
                                 Text="*" ValidationGroup="AddressGroup" ErrorMessage="Invalid moving date" Operator="GreaterThanEqual"
                                 Type="Date"></asp:CompareValidator>

    with this on the page loads event 

    int days = 1;
                    
                    vldcmpDateGreaterThan.ValueToCompare = DateTime.Today.AddDays(days).ToShortDateString();

    this does not work how can I resolve this 

    thanks
  2. Andrey
    Admin
    Andrey avatar
    836 posts

    Posted 21 Feb 2013 Link to this post

    Hello,

    Thank you for contacting us.

    What have changed in your code and how did you find out that the code is not working any more? Could you elaborate a bit more about your project. Thus I will have better understanding of your project and will be able to provide better suggestions.

    Additionally, note that in order to get best support service you need to use either Support tickets or forum threads. Currently the CodeLibrary project is not active so the people could not see and provide you with assistance on the other hand its response time as support thread instead of the 24/48 hours time for priority and regular support threads.

    Greetings,
    Andrey
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  3. David
    David avatar
    1 posts
    Member since:
    Jul 2013

    Posted 29 Jan 2015 in reply to Kath Link to this post

    http://www.telerik.com/forums/set-raddatepicker-mindate-property-from-aspx

    <telerik:RadDatePicker ID="RadDateEffectiveDate" runat="server" Culture="English (United States)" MinDate="<%# DateTime.Today.Date %>">
    </telerik:RadDatePicker>
    and in code behind

    protected void Page_Load(object sender, EventArgs e)
      {
          Page.DataBind();
      }
Back to Top