Is there a way to use a fa-icon to trigger the opening of the material calendar? This is what I currently have in my code:
<div class="form-group row">
<label for="start" class="editor-label col-sm-4"><strong> Time start:</strong></label>
<input [(ngModel)]="start" [ngModelOptions]="{standalone: true}"
type="text" class="date" id="start" value="start">
<span class="ml-2" (click)= "reOpenCalender()">
<fa-icon [icon]="faCalendarAlt" size="1x" #picker [styles]="{'color': '#B7B7B7'}"
></fa-icon>
</span>
</div>
This is how the corresponding ts script looks like:
reOpenCalender() {
let self = this;
setTimeout(() => {
self.picker.open();
}, 50);
}
Upon clicking on the icon, I encounter the following error:
core.js:4442 ERROR TypeError: self.picker.open is not a function
at widget-editor.component.ts:65
If anyone has encountered this issue before and knows the solution, please share.
Thank you!