TimeSpanEditBox issues

Editors for WPF Forum

Posted 7 years ago by Ralph
Version: 17.2.0661
Platform: .NET 4.6
Environment: Windows 7 (64-bit)

When I looked at the features, I thought "wow, it's the best time span editor on the market!", but when I started using it I found a few issues:


BUG #1

  1. Set up a sample application, bind the TimeSpanEditBox to some property.
  2. Set Format property to any custom string, for example "d\d hh\h mm\m ss\s" (which should result in a time string like "2d 14h 20m 00s")
  3. Run the application
  4. Use the mouse wheel or up/down keys to increment/decrement the individual parts.  You can also type in the time manually (observing the format, of course).  As soon as you move the focus away from the TimeSpanEditBox, all changes are lost and the displayed time span reverts to the previous value.
  5. But if you use the popup editor to edit the numbers, the changes are preserved.


BUG #2

  1. Run an application with a TimeSpanEditBox
  2. Open the popup editor
  3. Click either of the "+" or "-" semi-circular buttons in the centre
  4. The entire popup will immediately close not giving the user a chance to click "+" or "-" again


BUG #3

  1. Set up a TimeSpanEditBox with some format not displaying all available parts (for example "d.hh:mm" or "hh:mm:ss")
  2. Run the application, open the popup editor
  3. The popup editor header will display parts which are currently not in use (such as milliseconds)

Comments (6)

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

Hi Ralph,

Thanks for writing... let me reply to your comments.

1) We were able to add some logic to help with this scenario so that custom time span formats should be parsed better.  Previously the TimeSpan.TryParse was used and that didn't work well with custom formats.  Our updates for this will be in the next build 662.

2) Sorry but I'm not seeing this happen in our samples.  The popup isn't closing when we click the +/- buttons.  Can you tell us how to reproduce it in our samples or provide some really simple XAML in a new project that shows it?

3) If I understand correctly, you'd like to only have certain parts editable on the popup.  Would it only be on the lower end (ms, s, etc.) or could it happen on the upper end too (days)?  How would you like the API for this kind of thing to work, purely base it on the format used?

Actipro Software Support

Posted 7 years ago by Ralph

1) Fantastic! Thank you.

2) Add the TimeSpanEditBox to a Ribbon.  It works separately.

3) The TimeSpanEditBox always knows which parts are in use.  I think the popup should read the currently used parts automatically, this way the edit box content and the popup header will be in sync.

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

Hi Ralph,

2) Thanks, I see it happen now and we were able to get a fix in for the next maintenance release (build 662).

3) We also have updated the picker to only show parts that are editable via the custom format.

Actipro Software Support

Posted 7 years ago by Ralph


The best customer support ever!

Posted 7 years ago by Moondance

Hello I am at version 17.2.661.0 and my Timespan no longer works. I also use custom format because we wanted a specific look:


0d 1h 0m 0s with those spaces and those letters inserted in order to clarify for the user what unit he was changing. Then of course the spinner to the right.

To achieve that I used the following custom format:

private const string CustomDaysHoursMinutesSeconds = @" d'd ' h'h 'm'm 's's'";

But it stopped working with the upgrade to 17.2

So my questions are:

1) Is there a way to recover this functionality in 17.2.661?

2) If not will that custom string really work in 17.2.662?

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


In the code above, it looks like you have a couple extra spaces that can cause issues.  It should probably be:  @"d'd 'h'h 'm'm 's's'".  But I did test that format with 2017.2 build 662 here and it seemed to work.  It won't work in 2017.1 since we made updates for build 662 to better handle custom formats in this control.

If you write our support address, we can send you a preview build to try.  We hope to launch the official build 662 sometime this month.

Actipro Software Support

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