mercredi 26 février 2020

angular chekcbox is checked change other input value

I want to find a solution that if I check a checkbox then the value of the input field in another div will change to disabled.

``

<div class="24hr-example">
        <input placeholder="24hr format" aria-label="24hr format" [ngxTimepicker]="fullTime" [format]="24"  readonly>
        <ngx-material-timepicker #fullTime></ngx-material-timepicker>
   </div>

``

<app-checkbox [checked]="openingHours.is_closed_all_day" (change)="openingHours.is_closed_all_day = !openingHours.is_closed_all_day"></app-checkbox>

So if I click on the checkbox then the value of the input field given will be taken as disabled. I've tried to solve it with a function, but it couldn't work. What solution is possible to solve this?




Aucun commentaire:

Enregistrer un commentaire