Login Or Sign up
<div class="date-time-para">
                                    <div class="box-date">
                                        <label class="font-weight-bold"> Select Date {{notificationDetails.scheduled_date}}</label>
                                        <!-- <input type="date" formControlName="notificationDate" placeholder="Select Date" class="input-sample" placeholder="Select Date" [(ngModel)]="notificationDetails.scheduled_date"> -->
                                        <input type="date" formControlName="notificationDate" [ngModel]="notificationDetails.scheduled_date | date:'yyyy-MM-dd'" [min]="currentDate" />


                                    </div>
                                    <div class="box-date">
                                        <label class="font-weight-bold">Select Time</label>
                                        <!-- <input type="time" formControlName="notificationTime" placeholder="Select Date" class="input-sample" placeholder="Select Date" [(ngModel)]="notificationDetails.scheduled_time"> -->

                                        <input type="time" formControlName="notificationTime" [ngModel]="notificationDetails.scheduled_time" [min]="currentTime" />


                                    </div>
                                </div>

but same logic method i also implemented for time, but not be able to disabled past time from current time, can any one help ?

1

There are 1 best solutions below

2
Chinmaya Sahoo On

You should use [(ngModel)] correctly , you are using both formGroup and ngModel at the same time which is again not necessary , you can go with any one approach .