This is a migrated thread and some comments may be shown as answers.

RadDateTimePickerElement: MinDate, MaxDate limit

7 Answers 207 Views
Calendar, DateTimePicker, TimePicker and Clock
This is a migrated thread and some comments may be shown as answers.
Ramius
Top achievements
Rank 1
Ramius asked on 05 Jan 2009, 09:56 AM
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

7 Answers, 1 is accepted

Sort by
0
Nick
Telerik team
answered on 06 Jan 2009, 04:35 PM
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.
0
c mutex
Top achievements
Rank 1
answered on 20 Jul 2010, 07:46 AM
But I find that c#(vs2005) standard DatetimePicker can set to lower than 1900-1-1
0
Dobry Zranchev
Telerik team
answered on 20 Jul 2010, 05:43 PM
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
0
Dan
Top achievements
Rank 1
answered on 25 Mar 2014, 11:31 PM
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,
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 28 Mar 2014, 03:53 PM
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.

 
0
Dan
Top achievements
Rank 1
answered on 29 Mar 2014, 06:31 AM
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
0
Dan
Top achievements
Rank 1
answered on 29 Mar 2014, 09:06 AM
My mistake, this worked perfectly. I was looking at a different control.

Thanks
.
Tags
Calendar, DateTimePicker, TimePicker and Clock
Asked by
Ramius
Top achievements
Rank 1
Answers by
Nick
Telerik team
c mutex
Top achievements
Rank 1
Dobry Zranchev
Telerik team
Dan
Top achievements
Rank 1
Dess | Tech Support Engineer, Principal
Telerik team
Share this question
or