DateTimeEditBox: Format property behaves differently from DateTime.ToString( format )

Editors for WPF Forum

Posted 11 years ago by Jiping Zhu (James)
Version: 13.1.0582
Platform: .NET 4.0
Environment: Windows 7 (64-bit)

Hello guys,

In our application, a user can define a date time format that is used for both display and edit.

In display scenario, we use DateTime.ToString( format )

In edit scenario, we set DateTimeEditBox.Format = format

We start to notice inconsistent behaviors when format contains escaped symbols in literal:


E.g. (presuming current culture is En-AU)

1. DateTime behavior:


DateTime.Now.ToString(@"dd-MM-yyyy 'my \'special\' date'")



25-07-2013 my 'special' date


2. DateTimeEditBox behavior:


            <editors:DateTimeEditBox x:Name="editBox"
                                     Format="dd-MM-yyyy 'a \'special\' date'"
                                     Value="{x:Static system:DateTime.Today}">
                    <ScaleTransform ScaleX="{Binding ElementName=scaleSlider, Path=Value}" ScaleY="{Binding ElementName=scaleSlider, Path=Value}" />


DateTimeEditBox.DateValue binds to DateTime.Now


25-07-2013 a \0pecial' 25aAe'

Note how the first backslash is treated as a literal character rather than an escape character, and that the first escaped single quote is treated as a closing quote rather than a literal.


Is this a problem in DateTimeEditBox formatting?

Comments (1)

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


Thanks for reporting this.  We will update our code for the 2013.2 version to handle the escapes properly.

Actipro Software Support

The latest build of this product (v24.1.2) 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.