Breaking Change T929629
Visible to All Users

The TimeSpanMaskOptions.DefaultPart property type and the default value have been changed

What Changed

We changed the TimeSpanMaskOptions.DefaultPart property type from TimeSpanPart to TimeSpanPart?. The default value has been changed from Hour to null. As a result, the first non-optional mask segment is used by default. If a mask contains only optional segments (with square brackets [ and ]), the first optional segment is used by default.

Reasons for Change

We changed this property type and the default value to let users focus the first segment regardless of the chosen mask.

Impact on Existing Apps

Previously, editors with TimeSpan masks used hour as the default mask segment.

For example:

XAML
<dxe:TextEdit Mask="dd DD hh HH mm MM" MaskType="TimeSpan" />

In v20.2 and newer, the first non-optional mask segment is used by default.

If a mask contains only optional segments, the first optional segment is used by default.

How to Update Existing Apps

Set TimeSpanMaskOptions.DefaultPart to Hour to return to the previous behavior.

XAML
<dxe:TextEdit dxe:TimeSpanMaskOptions.DefaultPart="Hours" Mask="dd DD hh HH mm MM" MaskType="TimeSpan" />

Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.