How to disable previous date in Rad Date Picker

4 posts, 0 answers
  1. Ashok
    Ashok avatar
    23 posts
    Member since:
    Jul 2012

    Posted 20 Aug 2010 Link to this post

    Hi

    How to i Disable Previous dates,  Means less then today in Rad Date Picker.

    I need to show to select current date and future dates only.

    i want to disable Previous dates.

    Please Reply for this soon..

    Thanks,
    Ashok Anbarasu.
  2. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 20 Aug 2010 Link to this post

    Hello,

    Set the MinDate of the RadDatePicker control to disable the past days.

    Code Example:
    protected void Page_Load(object sender, EventArgs e)
    {
         RadDatePicker1.MinDate = DateTime.Today.Date;
    }


    Thanks,
    Princy.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. shubhangi
    shubhangi avatar
    19 posts
    Member since:
    Aug 2015

    Posted 27 Aug 2015 in reply to Princy Link to this post

    Above code is not working..Can you give me any other idea to achieve this
  5. Viktor Tachev
    Admin
    Viktor Tachev avatar
    1488 posts

    Posted 28 Aug 2015 Link to this post

    Hi,

    I tested the following code on my end and it is working as expected. Would you give it a try and let me know how it works for you?

    <telerik:RadDatePicker runat="server" ID="RadDatePicker1" OnLoad="RadDatePicker1_Load"></telerik:RadDatePicker>

    protected void RadDatePicker1_Load(object sender, EventArgs e)
    {
        (sender as RadDatePicker).MinDate = DateTime.Today;
    }


    Regards,
    Viktor Tachev
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top