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

raddatetimepicker not working after upgrading to asp .net ajax

3 Answers 63 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Bandana
Top achievements
Rank 1
Bandana asked on 01 Nov 2010, 08:45 PM
I am in the process of upgrading the radcontrols to asp .net ajax. 
The raddatetimepicker is causing problems with this.
the error i get is 
Value of '1/1/0001 12:00:00 AM' is not valid for 'SelectedDate'. 'SelectedDate' should be between 'MinDate' and 'MaxDate'.
Parameter name: SelectedDate

i have three options to show a document
1) show document
2) hide document
3) show for date range (this one take a show start and show end date)

for the first two options we are saving null in the database and when this value is returned it throws the error mentioned above. it works fine for the third option. 

any ideas as to how to return a null value for a raddatetimepicker when the value in the database is null??

Thanks!

3 Answers, 1 is accepted

Sort by
0
Sebastian
Telerik team
answered on 02 Nov 2010, 10:31 AM
Hi Bandana,

Consider passing the selected date from your database to the date picker using its DbSelectedDate property (which accepts null values). See this online demo for details.

Kind regards,
Sebastian
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
Bandana
Top achievements
Rank 1
answered on 02 Nov 2010, 03:37 PM
I am using DbSelectedDate which is why i am confused now.
0
Maria Ilieva
Telerik team
answered on 05 Nov 2010, 04:29 PM
Hello Bandana,

If using DbSelectedDate the application should not throw an exception if the new value is null or DBNull. Setting a null value should internally revert the SelectedDate to the null value, i.e. the input value will be empty.
As the provided information is not enough to isolate the root cause of the issue you are facing, please prepare a simple, fully runnable reproduction demo, open a new support ticket and send it to us along with very detailed reproduction steps and explanations and we will debug it locally and we will do our best to help.


All the best,
Maria Ilieva
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
Tags
General Discussions
Asked by
Bandana
Top achievements
Rank 1
Answers by
Sebastian
Telerik team
Bandana
Top achievements
Rank 1
Maria Ilieva
Telerik team
Share this question
or