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

Overriding native input parsing

1 Answer 88 Views
DatePicker
This is a migrated thread and some comments may be shown as answers.
Mike Gardner
Top achievements
Rank 1
Mike Gardner asked on 20 Jul 2011, 05:07 PM
My company is using RadControls for WPF Q1 2010 SP2. I am extending the RadDatePicker control to add certain behaviors that are used by our FSP suite of programs. We are using Visual Studio 2008 and C#.

When an invalid date is typed into the input box of a RadDatePicker (for example, 13/35/2011), its native behavior is to clear the field. I need to override this behavior to keep (not clear) the invalid input and set an error message property in our extended control. Is this possible and if so, how do I do that? I am not very experienced at how to code event handlers so if you could provide the code for how to hook the event and the skeleton of the new event handler, I would appreciate it.

Would this technique work for the RadTimePicker as well? I need to do the same thing to it.

Thanks,
Mike

1 Answer, 1 is accepted

Sort by
0
Konstantina
Telerik team
answered on 25 Jul 2011, 02:49 PM
Hi Mike,

I am sorry, but the RadDatePicker does not support custom parsing in this version. In Q2 2010 we introduced a new control - RadDateTimePicker. It supports custom parsing as explained in this help article. You can also check out its online demos for more examples.

Hope this information helps.

Best wishes,
Konstantina
the Telerik team

Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

Tags
DatePicker
Asked by
Mike Gardner
Top achievements
Rank 1
Answers by
Konstantina
Telerik team
Share this question
or