Three fields are available: "Duration, Repeat, Complete Duration". Users input the duration in the time format (HH:MM:SS) and provide a value for the repeat field such as "5,10,4,9,7, etc." The complete duration field should automatically populate based on the values entered in the first two fields.
I attempted to use Angular's NgModel for both text fields and multiplied the values by the repeat field value. However, I encountered issues with proper conversion.
<div>
<input type="value" [(ngModel)]="user.hrDuration">
<input type="value" [(ngModel)]="user.minDuration">
<input type="value" [(ngModel)]="user.secDuration">
</div>
<div>
<input type="value" [(ngModel)]="user.repeat">
</div>
<div>
<input type="value" [(ngModel)]="user.hrDuration*user.repeat">
<input type="value" [(ngModel)]="user.minDuration*user.repeat">
<input type="value" [(ngModel)]="user.secDuration*user.repeat">
</div>
Although I tried this method, it simply multiplied the values directly without proper conversion. My goal is to convert the values first before multiplying them by the repeat field value.
Appreciate any help provided!