Bug Report T129306
Visible to All Users

cxDateEdit - The editor displays the validation mask specified by the Properties.EditFormat property if the Properties.InputKind property is set to ikMask

created 11 years ago

Given a TcxDateEdit (or DB-aware, or grid-column) with InputKind=ikMask:

Setting EditFormat from code instead of the designer gives the wrong type of EditMask - the generated one is a regular expression from TcxCustomDateEditProperties.BuildEditMask or thereabouts. Before the date is set (via the drop-down calendar), the text in the control is:

"([ 12]?[1- ]|[123] |31)'.'(( ?[1- ]|1[ 12])|('j n'|'feb'|'m r'|' pr'|'m i'|'jun'|'ju '|' ug'|'sep'|'okt'|'nov'|'des'))'.'dddd' '([ 1]?d|2[ -3]):[ -5]?d"

The control also behaves as if InputKind=ikRegExpr. Typing in the middle of the text will remove the trailing characters, instead of overwriting one character.

See the attached file for an example.

Other minor notes about TcxDateEditProperties:

  1. UseDisplayFormatWhenEditing appears not to be honored. It isn't published, but it is documented, and can thus only be set from code. Perhaps it isn't meant to be used.

  2. The property Nullstring has a lower-case "s", which looks out of place when seen next to UseNullString :)

Show previous comments (8)
DevExpress Support Team 11 years ago

    I am afraid that it is not acceptable. Not all formats can be implemented using standard masks, so we have to use regular expressions. Otherwise, complicated formats will not work.

      Understandable.
      Can you make the following four functions protected & virtual, so it is possible to subclass and override this? The GetInputKind change broke our earlier overridden functions.
      TcxCustomDateEditProperties.BuildEditMask
      TcxCustomDateEditProperties.GetInputKind
      TcxCustomDateEditProperties.GetEmptyDisplayValue
      TcxCustomDateEditProperties.GetTimeZoneInfo

      DevExpress Support Team 11 years ago

        I have created a separate ticket to implement this change with future releases (TcxCustomDateEditProperties - make the BuildEditMask, GetInputKind, GetEmptyDisplayValue, and GetTimeZoneInfo methods virtual ).

        Answers approved by DevExpress Support

        created 11 years ago

        We have fixed the issue described in this ticket and will include the fix in our next maintenance update. To apply this solution before the official update, request a hotfix by clicking the corresponding link for product versions you require.

        Note: Hotfixes may be unavailable for beta versions and updates that are about to be released.

          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.