I have a select like this :
<mat-select placeholder="..." (change)="onChange($event.value)">
<mat-option *ngFor="let option of options" [value]="option.value">
{{ option }}
</mat-option>
</mat-select>
<div class="disable">
<mat-form-field>
<input matInput [matDatepicker]="picker" placeholder="Choose a date">
<mat-datepicker #picker ></mat-datepicker>
</mat-form-field>
</div>
disable class just hide the contain of the div.
In my onChange($event) :
onChange(value) {
if(value === 'someValue'){
openDatePicker() //How to do this ??
}
}
If a specific value is selected i'd like to open the date picker. Is that possible to do this from typescript ?
Thanks for your response