Skip to content

DateTimePicker with custom format auto increments when focus is changed #817

@xceedsoftware

Description

@xceedsoftware

diiode[CodePlex]
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=quotyyyy-MM-ddTHH:mm:ssZquot and the user changes focus between
DateTimePicker-controls, the previous focused control auto increments it's hour with 2.

How to reproduce

Run the code underneath Fill in the two DateTimePicker-controls with a (random) date Tab between/or change focues between the two controls
-gt The datetime will be auto-incremented.

Code:
ltWindow x:Class=quotWpfApplicationDateTimePickerTest.MainWindowquot
xmlns=quothttp://schemas.microsoft.com/winfx/2006/xaml/presentationquot
xmlns:xctk=quothttp://schemas.xceed.com/wpf/xaml/toolkitquot
xmlns:x=quothttp://schemas.microsoft.com/winfx/2006/xamlquot
Title=quotMainWindowquot Height=quot350quot Width=quot525quotgt
ltGridgt
ltGrid.RowDefinitionsgt
ltRowDefinition Height=quotAutoquot /gt
ltRowDefinition Height=quotAutoquot /gt
lt/Grid.RowDefinitionsgt
ltGrid.ColumnDefinitionsgt
ltColumnDefinition Width=quotAutoquot /gt
ltColumnDefinition Width=quotAutoquot /gt
lt/Grid.ColumnDefinitionsgt

    ltLabel Grid.Row=quot0quot Grid.Column=quot0quotgt
        Timepicker 1
    lt/Labelgt
    ltxctk:DateTimePicker Grid.Row=quot0quot Grid.Column=quot1quot x:Name=quotDtck1quot Width=quot200quot
                         Format=quotCustomquot FormatString=quotyyyy-MM-ddTHH:mm:ssZquot TextAlignment=quotLeftquotgt
    lt/xctk:DateTimePickergt
    ltLabel Grid.Row=quot1quot Grid.Column=quot0quotgt
        Timepicker 2
    lt/Labelgt
    ltxctk:DateTimePicker Grid.Row=quot1quot Grid.Column=quot1quot x:Name=quotDtck2quot
                         Format=quotCustomquot FormatString=quotyyyy-MM-ddTHH:mm:ssZquot TextAlignment=quotLeftquotgt

    lt/xctk:DateTimePickergt
lt/Gridgt

lt/Windowgt

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions