RadDateTimePickerElement: MinDate, MaxDate limit

8 posts, 0 answers
  1. Ramius
    Ramius avatar
    127 posts
    Member since:
    Feb 2008

    Posted 05 Jan 2009 Link to this post

    What are the MinDate and MaxDate limits ?

    In the Documentation i have not found a limit for these values and i was surprised that the valid datetime value 31.12.9999 was not accepted form the RadDateTimePickerElement.

    Greetings,

    Ramius
  2. Nick
    Admin
    Nick avatar
    767 posts

    Posted 06 Jan 2009 Link to this post

    Hello Ramius,

    Thank you for your inquiry. Like the standard DateTime picker, the maximum valid date is 31th of Dec, 9998. The min date is Jan. 1st 1900.
     

    Best wishes,
    Nick
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  3. UI for WinForms is Visual Studio 2017 Ready
  4. c mutex
    c mutex avatar
    5 posts
    Member since:
    Jan 2010

    Posted 20 Jul 2010 Link to this post

    But I find that c#(vs2005) standard DatetimePicker can set to lower than 1900-1-1
  5. Dobry Zranchev
    Admin
    Dobry Zranchev avatar
    348 posts

    Posted 20 Jul 2010 Link to this post

    Hello c mutex,

    Thank you for your feedback. I researched this issue and I saw that the minimum value that could be set in the microsoft's datetimepicker is 1/1/1753. I updated your Telerik points for the report. This issue will be solve in the 2010 Q2 SP1.

    If you have another questions feel free to contact us.

    Best wishes,
    Dobry Zranchev
    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
  6. Dan
    Dan avatar
    5 posts
    Member since:
    Nov 2012

    Posted 25 Mar 2014 Link to this post

    Is there a way to change the default for MaxDate to 12/31/9999 ?
    All of our forever term dates in our database are set 12/31/9999 and using the datetimepicker causes an update everytime when apply this date. I can not use the DatatimePicker or any of the controls that use it if I cant change the default date.

    Thanks,
  7. Dess
    Admin
    Dess avatar
    1609 posts

    Posted 28 Mar 2014 Link to this post

    Hello Dan,

    Thank you for contacting Telerik Support.

    The maximum supported date in our RadDateTimePicker control can be found in the RadDateTimePickerElement.MaximumDateTime static readonly property, which value is December 31, 9998. The same maximum value is allowed for the standard DateTimePicker control. However, you can change this value via reflection:
    FieldInfo fi = typeof(RadDateTimePickerElement).GetField("MaxDateTime", BindingFlags.Static | BindingFlags.Public);
    fi.SetValue(null, DateTime.MaxValue, BindingFlags.Public | BindingFlags.Static, null, null);
     
    this.radDateTimePicker1.MaxDate = DateTime.MaxValue;
    this.radDateTimePicker1.Value = this.radDateTimePicker1.MaxDate;

    I hope this information helps. Should you have further questions, I would be glad to help.

    Regards,
    Desislava
    Telerik
     

    Build cross-platform mobile apps using Visual Studio and .NET. Register for the online webinar on 03/27/2014, 11:00AM US ET.. Seats are limited.

     
  8. Dan
    Dan avatar
    5 posts
    Member since:
    Nov 2012

    Posted 29 Mar 2014 in reply to Dess Link to this post

    Thanks for the info. That sort of works, I can enter 12/31/9999 but the calendar picker doesnt allow it to go past 12/31/9998 still.
    Any way to fix that also.

    Thanks, Dan
  9. Dan
    Dan avatar
    5 posts
    Member since:
    Nov 2012

    Posted 29 Mar 2014 Link to this post

    My mistake, this worked perfectly. I was looking at a different control.

    Thanks
    .
Back to Top
UI for WinForms is Visual Studio 2017 Ready