launch datepicker in a dialog and click outside dialog will result in a small square on the screen
Bug, feature request, or proposal:
bug
What is the expected behavior?
datepicker should get dismissed and the dialog should keep open unless I click outside again.
What is the current behavior?
both datepicker and dialog are gone, but remain a small square on the screen
What are the steps to reproduce?
- in a dialog (contains a form)
<md-input-container class="full-width">
<input mdInput
[mdDatepicker]="dueDatePicker"
placeholder="pick a due date"
formControlName="dueDate">
<button mdSuffix [mdDatepickerToggle]="dueDatePicker"></button>
</md-input-container>
<md-datepicker touchUi="true" #dueDatePicker></md-datepicker>
- launch the dialog, and then launch date picker
- click outside dialog and datepicker
- you will see a small square on the screen
What is the use-case or motivation for changing an existing behavior?
Which versions of Angular, Material, OS, TypeScript, browsers are affected?
Angular 4, Material beta5, macOS 10.12.4, Chrome: 57.0.2987.133 (64-bit)
Is there anything else we should know?
Can you repro in a plunker?
For our app, clicking outside the datepicker just closes the datepicker, not the dialog.
I also get the small square. In my case it's because I navigate to another component when a selection is made and I guess the calendar has not completed its exit animation. It sort of works if I wrap the navigate in a setTimeout(..,0). I say "sort of" because you still see the small square for a short while before it disappears,
https://plnkr.co/edit/uGdquTlfAJxs3C5yCEPp
Looks like this has been fixed in master (here's a version of @pietie's plunker with updated systemjs.config.js: https://plnkr.co/edit/oKF71oguDhHtOWQL6eGS?p=preview)
Opening the issue again.
Touch UI is or have become bugged again for mat datepicker, so you need to use "setTimeout(() => this.router.navigate(['/home']), 0);" for it to close correctly when a navigation happen while it is open, so you don't get the small box that block all input.
This issue has been automatically locked due to inactivity. Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.