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

[Solved] Invalid input produces undesired behavior

1 Answer 100 Views
TimePicker
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Chris Jones
Top achievements
Rank 1
Chris Jones asked on 10 Feb 2010, 04:38 PM
If an invalid time number is entered, like 2900, the entry is nulled.
If text is entered into a time value, like "asdf", a value of 12:00 AM is used.

Both of these cases can be seen here: http://demos.telerik.com/silverlight/#TimePicker/FirstLook

My question is the different defaulting of values (null and 12:00 AM) a bug?  I would hope that all invalid data entry would produce the same output (preferably null).

Also, a nice to have would be to have a Validation error thrown for invalid input.

Thanks,
Chris.

1 Answer, 1 is accepted

Sort by
0
Konstantina
Telerik team
answered on 12 Feb 2010, 05:01 PM
Hi Chris,

Thank you for contacting us.

This is the expected behavior of the DatePicker. There are two cases:
1. When you enter invalid digits, then the DatePicker returns null.
2. When entering something other than digits the DatePicker returns the first hour.
If you want when entering invalid value always to return null, you can use the LostFocus event and clear the value there.

If you have further questions please feel free to contact us again.

Regards,
Konstantina
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
TimePicker
Asked by
Chris Jones
Top achievements
Rank 1
Answers by
Konstantina
Telerik team
Share this question
or