Quantcast
Channel: Extended WPF Toolkit™ Community Edition
Viewing all articles
Browse latest Browse all 4964

Commented Issue: TimeSpanUpDown cannot handle large TimeSpan [21416]

$
0
0
TimeSpanUpDown cannot handle large TimeSpan because of the way it attempts to convert the TimeSpan ticks into an equivalent DateTime. As DateTime are limited to the year 9999 or earlier large TimeSpan cause the DateTime constructor to fault. The TimeSpan I am trying to edit is 10675199.02:48:05.4775807.

The fix I'm proposing is to simply skip the DateTime conversion as it does not appear to do anything useful. Here's the code change in Xceed.Wpf.Toolkit\TimeSpanUpDown\Implementation\TimeSpanUpDown.cs (in ParseValueIntoTimeSpanInfo around line 236):

Replace
```
DateTime tempDate = new DateTime( span.Ticks );
info.Content = tempDate.ToString( info.Format );

```
With:

```
info.Content = span.ToString( info.Format );
```
Comments: ** Comment from web user: mwpowellhtx **

Obvious question, I am working with a library that is connected via NuGet. That is the latest, v2.3 at this moment, I think it is. "It will be included in v2.5", when is this NuGet release scheduled? Thank you...


Viewing all articles
Browse latest Browse all 4964

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>