Rad DatePicker Max date is only 12/30/2099

7 posts, 0 answers
  1. Kalyan Thiyagarajan
    Kalyan Thiyagarajan avatar
    4 posts
    Member since:
    Mar 2010

    Posted 05 Mar 2010 Link to this post

    Hi Guys,

    I am using a Rad Date Picker for AJAX and I am not able to select 12/31/2099 which is the based on requirement. How Can I achieve this?

    Regards,
    Kalyan
  2. Daniel
    Admin
    Daniel avatar
    4945 posts

    Posted 05 Mar 2010 Link to this post

    Hello Kalyan,

    You can set the desired max date via the corresponding property (MaxDate):
    <telerik:RadDatePicker
       ID="RadDatePicker1"
       runat="server"
       MaxDate="01-01-2200">
    </telerik:RadDatePicker>

    MaxDate Property

    Kind regards,
    Daniel
    the Telerik team

    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 Public Issue Tracking system and vote to affect the priority of the items.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Kalyan Thiyagarajan
    Kalyan Thiyagarajan avatar
    4 posts
    Member since:
    Mar 2010

    Posted 09 Mar 2010 Link to this post

    Thanks this works Great!
  5. Dominic
    Dominic avatar
    3 posts
    Member since:
    Aug 2012

    Posted 09 Aug 2012 Link to this post

    How do you set Rad DatePicker of attribute Maxdate to always dynamically equal today's date? Please help
  6. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 09 Aug 2012 Link to this post

    Hi Dominic,

    Try the following code to set MaxDate of RadDatePicker to today's date.

    C#:
    RadDatePicker1.MaxDate = DateTime.Today;

    Hope this helps.

    Regards,
    Princy.
  7. Dominic
    Dominic avatar
    3 posts
    Member since:
    Aug 2012

    Posted 10 Aug 2012 Link to this post

    Hello Princy,

    I realized that I am working with RadDateInput not radDatePickker. On the page view coding, I am trying to get the attribute Maxdate to accept asp script  Maxdate= "&lt;%# System.DateTime.Today %&gt;"  (&lt;%# = <%# and %&gt;= %> )   

    but for some strange reason the script code is not working. Is there another way  to call date into Maxdate attribute using C#  properties within asp script..  PS it cannot take Tostring because it's  property are not defined to the asp server. 


        <td class="tdfv" colspan="3"><telerik:RadDateInput ID="DateOfBirth" runat="server" Skin="Web20" Height="14px" Width="70px" DateFormat="MM/dd/yyyy" MinDate="1880-01-01" MaxDate="&lt;%# System.DateTime.Today %&gt;" ShortYearCenturyEnd="&lt;%# System.DateTime.Today.Year %&gt;" SelectionOnFocus="SelectAll" CausesValidation="True" /></td>

    This whole code is in a ascx file.
  8. Dominic
    Dominic avatar
    3 posts
    Member since:
    Aug 2012

    Posted 13 Aug 2012 Link to this post

    I figured it out myself:

    Add


    dateOfBirth = Page.FindControlRecursively("DateOfBirth") as Telerik.Web.UI.RadDateInput;
                            dateOfBirth.MaxDate = System.DateTime.Today;


    to EditPersonPhysicalDetails.ascx.cs file underneath the 'public void LoadData()' Method , under LoadData_Base();


    Boy I'm smart!!!!!!!!!!!!!!!!
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017