Trying to set calendar date = today or greater

Thread is closed for posting
3 posts, 0 answers
  1. C2F5DFAF-A1BA-4B31-803D-72F4DE4680EC
    C2F5DFAF-A1BA-4B31-803D-72F4DE4680EC avatar
    2 posts
    Member since:
    May 2012

    Posted 18 Feb 2013 Link to this post


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

    all browsers supported by RadControls

    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"

    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 

  2. 2B755ED1-9557-4032-A918-C0CF8A4F6331
    2B755ED1-9557-4032-A918-C0CF8A4F6331 avatar
    836 posts
    Member since:
    Feb 2017

    Posted 21 Feb 2013 Link to this post


    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.

    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. 08EB0719-394A-426C-869F-4DADA2AF5196
    08EB0719-394A-426C-869F-4DADA2AF5196 avatar
    1 posts
    Member since:
    Jul 2013

    Posted 29 Jan 2015 in reply to C2F5DFAF-A1BA-4B31-803D-72F4DE4680EC Link to this post

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

    protected void Page_Load(object sender, EventArgs e)
Back to Top

This Code Library is part of the product documentation and subject to the respective product license agreement.