I want to disabled this two inputs with choosing immediately_apply radio button
here my html code:
<label>repeat mode:</label>
<mat-radio-group class="repeat_group" formGroupName="is_cron">
<mat-radio-button class="repeat_button" id="1" value="daily_repaet">daily</mat-radio-button>
<mat-radio-button class="repeat_button" id="2" value="immediately_apply">immediately</mat-radio-button>
</mat-radio-group>
<div class="field">
<label>start:</label>
<mat-form-field appearance="fill" class="time_field">
<mat-label>minute</mat-label>
<input #cronselector_disabled type="number" matInput formControlName="minute_start" class="dir-ltr" min="0" max="60">
</mat-form-field>
<mat-form-field appearance="fill" class="time_field">
<mat-label>hour</mat-label>
<input #cronselector_disabled type="number" matInput formControlName="hour_start" class="dir-ltr" min="0" max="24">
</mat-form-field>
</div>
2
Answers
Give change event in your immediately radio button.
Use Disabled property in two inputs.
And in your TS file just set inputDisabled to true wheck checked and define inputDisabled in your TS.
I hope this will help you!!
HTML
TS