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

Commented Issue: DateTimePicker with custom format auto increments when focus is changed [21188]

$
0
0
This bug is found in the community edition of Extended WPF Toolkit atleast since version 2.0. The bug itself is in the _DateTimePicker_-control.

__Description__
When the format of an _DateTimePicker_ is custom set to the _FormatString="yyyy-MM-ddTHH:mm:ssZ"_ and the user changes focus between _DateTimePicker_-controls, the previous focused control auto increments it's hour with 2.

__How to reproduce__
1. Run the code underneath
2. Fill in the two _DateTimePicker_-controls with a (random) date
3. Tab between/or change focues between the two controls
-> The datetime will be auto-incremented.

_Code:_

``` XAML
<Window x:Class="WpfApplicationDateTimePickerTest.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="MainWindow" Height="350" Width="525">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>

<Label Grid.Row="0" Grid.Column="0">
Timepicker 1
</Label>
<xctk:DateTimePicker Grid.Row="0" Grid.Column="1" x:Name="Dtck1" Width="200"
Format="Custom" FormatString="yyyy-MM-ddTHH:mm:ssZ" TextAlignment="Left">
</xctk:DateTimePicker>
<Label Grid.Row="1" Grid.Column="0">
Timepicker 2
</Label>
<xctk:DateTimePicker Grid.Row="1" Grid.Column="1" x:Name="Dtck2"
Format="Custom" FormatString="yyyy-MM-ddTHH:mm:ssZ" TextAlignment="Left">

</xctk:DateTimePicker>
</Grid>
</Window>
```
Comments: ** Comment from web user: diiode **

Thanks,

Using standard format "u" is a working solution for my use case.


Viewing all articles
Browse latest Browse all 4964

Trending Articles



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