Skip to content

DataGrid DataGridTemplateColumn CalendarDatePicker and DatePicker Flash Then Desappear! #2493

@maxmin88

Description

@maxmin88

I'm submitting a...

Bug report (I searched for similar issues and did not find one)

Current behavior

In a DataGridTemplateColumn with a CalendarDatePicker as the template when clicking on the date or icon the calendar picker flashes and then disappears. This is the same for CalendarDatePicker and DatePicker. Also the same result if CellTemplate or CellEditTemplate is used.

See code example below.

Expected behavior

Should be able to click on the date or the calendar icon and the calendar grid or date picker should open and stay open until the date is selected. The resulting date selected should be displayed in the date view.

Minimal reproduction of the problem with instructions

Please see example code below.

Environment

Nuget Package(s): 
Microsoft.Toolkit.Uwp.UI.Controls.DataGrid
Package Version(s): 
4.0

Windows 10 Build Number:
- [ ] Creators Update (15063)
- [ ] Fall Creators Update (16299)
- [x ] April 2018 Update (17134)
- [ ] Insider Build (build number: )

App min and target version:
- [ ] Creators Update (15063)
- [ min] Fall Creators Update (16299)
- [ target ] April 2018 Update (17134)
- [ ] Insider Build (xxxxx)

Device form factor:
- [X ] Desktop
- [ ] Mobile
- [ ] Xbox
- [ ] Surface Hub
- [ ] IoT

Visual Studio 
- [ X] 2017 (version: 15.8.4 )
- [ ] 2017 Preview (version: )

<UserControl.Resources> <DataTemplate x:Key="CalendarCell"> <TextBlock Text="{Binding DateCreated}"/> </DataTemplate> <DataTemplate x:Key="CalendarCellEdit"> <CalendarDatePicker Date="{Binding DateCreated}" /> </DataTemplate> </UserControl.Resources>

<dg:DataGrid x:Name="grdNotes" > <dg:DataGrid.Columns> <dg:DataGridTemplateColumn CellTemplate="{StaticResource CalendarCell}" CellEditingTemplate="CalendarCellEdit"/> </dg:DataGrid.Columns> </dg:DataGrid>

Metadata

Metadata

Assignees

No one assigned

    Labels

    Completed 🔥DataGrid 🔠Issues on DataGrid controlbug 🐛An unexpected issue that highlights incorrect behavior

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions