In the DataForm, when autogenerating fields for DateTime properties we're replacing the default control with the DateTimePicker. Below is the code that replaces the textbox with the picker (e is an instance of DataFormAutoGeneratingFieldEventArgs):
var tabIndex = ((Control)e.Field.Content).TabIndex;
var picker =
new
Telerik.Windows.Controls.DateTimePicker { TabIndex = tabIndex };
var binding = e.Field.Content
.GetBindingExpression(DatePicker.SelectedDateProperty)
.ParentBinding.CreateCopy();
binding.Mode = BindingMode.TwoWay;
picker.SetBinding(DateTimePicker.SelectedDateTimeProperty, binding);
e.Field.Content = picker;
When a user enters garbage characters in the date portion of the picker ui, a tooltip appears with the word "Error" and the displayed date value is reverted to the property value. The issue we're encountering is the the time entry portion of the picker ui does not behave the same way. If you enter garbage characters in the time text box, the bad data entry just stays there, the binding doesn't get updated, nothing happens.
How can I make the time field work like the date entry field?
Thanks,
jeremy