close
The Wayback Machine - https://web.archive.org/web/20210120052459/https://github.com/windows-toolkit/WindowsCommunityToolkit/issues/3557
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DataGrid with DatePicker Flashing #3557

Closed
jcbeppler opened this issue Nov 7, 2020 · 4 comments
Closed

DataGrid with DatePicker Flashing #3557

jcbeppler opened this issue Nov 7, 2020 · 4 comments

Comments

@jcbeppler
Copy link

@jcbeppler jcbeppler commented Nov 7, 2020

This issue has already been reported before, although MSFT bot closed it LOL (no comments regarding this):

#2493

Funny thing in this issue is if you set IsReadOnly="True" it indeed solves the date picking problem but if you are using MVVM, you won't get your data generating notification.

                <controls:DataGridTemplateColumn Header="Pick a Date" IsReadOnly="False">
                    <controls:DataGridTemplateColumn.CellEditingTemplate>
                        <DataTemplate>
                            <CalendarDatePicker Date="{Binding myDate, Mode=TwoWay}" />
                        </DataTemplate>
                    </controls:DataGridTemplateColumn.CellEditingTemplate>
                </controls:DataGridTemplateColumn>

Debugging, I got more or less to the following conclusion:
Consider: IsReadOnly="False"

1- If I click on the DatePicker while the line is not selected yet (e.g. 20/5/1999), it works allowing me to pick up a new date (4/1/2000) BUT it won't update with the binding. The UI updates but not the binding.

2- After doing 1, if you click in the same line in the DatePicker, it will try to retrieve data from the model which is still the old 20/5/1999, but when it does, the DatePicker immediately closes without user having the chance to select anything. (Paradox between model and current UI value?)

Couldn't find a way to fix this.

Maybe creating a DataGridCalendarDatePickerColumn would be a good idea as this is usually used a lot (I believe).

Thanks.

@jcbeppler jcbeppler added the bug 🐛 label Nov 7, 2020
@msftbot msftbot bot added the needs triage 🔍 label Nov 7, 2020
@msftbot
Copy link
Contributor

@msftbot msftbot bot commented Nov 7, 2020

Hello jcbeppler, thank you for opening an issue with us!

I have automatically added a "needs triage" label to help get things started. Our team will analyze and investigate the issue, and escalate it to the relevant team if possible. Other community members may also look into the issue and provide feedback 🙌

@Kyaa-dost
Copy link
Contributor

@Kyaa-dost Kyaa-dost commented Nov 8, 2020

Looping in @anawishnoff @RBrid ⬆️

@michael-hawker
Copy link
Member

@michael-hawker michael-hawker commented Nov 9, 2020

@Kyaa-dost the old issue has more details, looks like the old bot aggressively closed it :(.

Can we unlock that one and add @jcbeppler's details to it as well?

@Kyaa-dost
Copy link
Contributor

@Kyaa-dost Kyaa-dost commented Nov 9, 2020

@michael-hawker done ✔️

Going to close this for now if not needed.

@jcbeppler tagged you there.

@Kyaa-dost Kyaa-dost closed this Nov 9, 2020
@msftbot msftbot bot locked as resolved and limited conversation to collaborators Jan 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.