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

[Solved] NullReferenceException When DatePicker Date in TextBox is Deleted

1 Answer 33 Views
Date/Time Pickers
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Rob
Top achievements
Rank 1
Rob asked on 09 Aug 2011, 02:24 PM

This is a bug in both Q1 and Q2 2011 - the only solution I've been able to come up with is to rollback to Version 2010.3.1318...

When using DatePickerFor:

@Html.Telerik().DatePickerFor(sc => sc.StartDate).ShowButton(true)

 

 

 

When I delete the date in the TextBox of the DatePicker, post my form, fail validation, then re-display the view, I get a NullReferenceException where the DatePicker is being rendered.  The view is a strongly-typed view and the actual value of StartDate (in the controller and in the re-displayed view) is DateTime.MinValue (which I expected).

With NO CHANGES IN CODE, this problem is resolved by going back to Version 2010.3.1318 so it seems that the issue was introduced some time after that release.

I'd like to use the latest version of the controls - when do you think this might be fixed?

Thanks...


1 Answer, 1 is accepted

Sort by
0
Atanas Korchev
Telerik team
answered on 10 Aug 2011, 06:13 AM
Hi Rwade,

 I couldn't reproduce this in a sample project using the 2011.2.712 build. Please find attached my project. Let me know if it works for you or if I am missing something.

Regards,
Atanas Korchev
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
Date/Time Pickers
Asked by
Rob
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
Share this question
or