Usability of DateTimeEditBox w/ Constraints

Editors for WPF Forum

Posted 12 years ago by Mike Strobel - Software Engineer, CDC Software
I encountered a usability issue in the "DateTimeEditBox Constraints" QuickStart. To reproduce, check the box to "Restrict to business hours (8am - 5pm)". The initial time is now "8:00:00 AM". If you start to edit the time and type "4:", with the intention of typing in a complete value of "4:00:00 PM", the hour field gets reset back to "8" because the AM/PM part is initially set to "AM", and "4:00:00 AM" is outside the allowed value range. The user must first move to the AM/PM part and change it to PM before entering "4" as the hour. In my opinion, this is a usability problem. Perhaps the time should only be validated once the editor loses focus or the last part is changed?

Comments (1)

Posted 12 years ago by Actipro Software Support - Cleveland, OH, USA
Yeah, you're right this is confusing :-)

Basically, the "restriction" is applied by the sample, which handles the ValueChanging event. Currently, when you type "4:" then ValueChanging is fired and the sample coerces to the range of 8am-5pm.

What we can do is coerce the value better. So if you type "4:", then we can assume you meant 4pm (because 4am is not valid). But things like "7:" would still coerce as they do now, because neither 7am or 7pm are valid.

Actipro Software Support

The latest build of this product (v21.1.1) was released 3 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.