I am trying to disable the 3 Input fields when 1st radio box selected, 2nd radio button enables SHIFT START and END input while the third enables all the three. I am able to disable or enable either all input fields or disable them. I am stuck here now. Cannot understand how to enable only two inputs.
Here is the code
<form name="contactForm">
<div class="form-group">
<label for="shiftdetails">Select the type of details.</label><br>
<input type="radio" id="pagerdetails" value="Pager" name="selection" (click)="toggleDiv()" > <label>Pager Details</label><br>
<input type="radio" id="shiftdetails" value="Shift"name="selection" (click)="toggleDiv(2)">
<label for="nonbusiness">Shift Details</label>
<br>
<input type="radio" id="additional" name="selection" value="additional" (click)="toggleDiv(1)">
<label for="additional">Additional/Extra Hours</label><br>
</div>
<div class="form-group">
<label for="StartTime">Shift Start Time</label>
<input type="time" class="form-control" id="StartTime" name="StartTime" required [(ngModel)]="StartTime"
value="{{StartTime}}" [disabled]="!isChecked">
</div>
<div class="form-group">
<label for="EndTime">Shift End Time</label>
<input type="time" class="form-control" id="EndTime" name="EndTime" aria-describedby="fullNameHelp"
required [(ngModel)]="EndTime" value="{{EndTime}}" [disabled]="!isChecked">
</div>
<div class="form-group">
<label for="Reason">Reason</label>
<input type="text" class="form-control" id="Reason" name="Reason" aria-describedby="Reason"
placeholder="Enter Reason" [(ngModel)]="Reason" value="{{Reason}}" required [disabled]="!isChecked">
</div>
TS CODE
toggleDiv(x) {
this.isChecked = (x === 1)
}
}