lundi 6 janvier 2020

If else statement is not displaying the textbox properly

I am comparing two conditions here and trying to display a textbox based on the condition. If two dates are matching and task also same then i have to display the time entered in the textbox from database if it is already entered, if not i need to display am empty text box. But its not working. Can any one please help me?

<div *ngFor="let userTimesheet of timesheet">
    <div *ngIf="(((currentSun | date:'MM/dd/yyyy') === (userTimesheet?.task_date | date:'MM/dd/yyyy')) && (user.task.task_id == userTimesheet?.task))); else notMatching " >
                <input type="text" value="" formControlName="sundaytime">
    </div>
        <ng-template #notMatching>
                <input type="text" value="" formControlName="sundaytime">
        </ng-template>
</div>

Aucun commentaire:

Enregistrer un commentaire