RadDatePicker-Disable future dates.

2 posts, 0 answers
  1. Tarang
    Tarang avatar
    11 posts
    Member since:
    Oct 2011

    Posted 10 Nov 2011 Link to this post

    Hi,

    I am new to telerik,I have implemented a calender with RadDatePicker and wanted too disable future dates.
    For that in the pageload of the page I wrote this code:-

    if

     

    (!Page.IsPostBack)

     

    {

     

    this.radDatePicker1.MaxDate = DateTime.Today;

     

    }

    I checked it was working fine,for further testing ,I changed the system date to various dates and found that it was fine.
    But after two days when I again checked,this code seemed to have no effect as all future dates are enabled.

    Can anyone please let me konw how can I achieve my task?

    Thanks,
    Tarang
  2. Andrey
    Admin
    Andrey avatar
    836 posts

    Posted 14 Nov 2011 Link to this post

    Hi Tarang,

    You should not have problems with setting MaxDate property of RadDatePicker. Please elaborate a bit more on the matter and if it is possible, share sample project that illustrates the issue, so we can test/debug it locally.

    All the best,
    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. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top