I'm trying to open material DatePicker when component loaded using element id (#).
When I try use ngAfterViewInit it always return 'cannot use 'open' to undefined'.
It works when I click calendar icon or even add click property to a button with open() function.
I created simple stackblitz page here https://stackblitz.com/edit/angular-7dkbsw?file=src%2Fapp%2Fapp.component.html when you can check what I want to acheive.
picker ID is defined as a material element that should open modal with calendar.