Get the MaskedTextBox to lose focus when the drop down of DateTimeEditBox is opened?

Editors for WPF Forum

Posted 12 years ago by Dagny Jackson
Version: 12.1.0560
Avatar

We've noticed behaviour in the 'out of the box' WPF DateTimeEditBox displaying both date and time (default format):

If you click inside the masked text box anywhere in the date portion, THEN click the arrow to access the drop down content, if the first thing you click is the spinner in the time portion of the drop down, whatever element of the date that has focus (in the maskedtext box) will be affected. So, it will jump months if it's in the month portion, years, if it's in the year portion, etc.

From a programming stance, the behaviour does make sense, because the relevant portion of the date in the masked text box is still showing focus and reacting. However, because the spinner is in the time display control on the drop down, a user would naturally assume that clicking it would only change the time, not the date.

The spinner on the drop down acts as expected (only changing the time portion) as long as nothing in the date portion of the masked text box has been selected  before opening the drop down OR if a date is chosen via the calendar portion of the drop down BEFORE trying to use the spinner in the time portion. Basically, by drawing the focus away from the date in the masked text box, all is good.

So long story short...is there something I can do to make the MaskedTextBox lose focus when the drop down of the DateTimeEditBox is clicked?

Comments (2)

Answer - Posted 12 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Dagny,

We took a look at the problem and have updated our code to fix it for the next maintenance release. Thank you for reporting the issue, the focus now switches when the drop down arrow is clicked so the spinner works as the user would expect.


Actipro Software Support

Posted 12 years ago by Dagny Jackson
Avatar

Thank you.

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

Add Comment

Please log in to a validated account to post comments.