Hello
i am using a datepicker like so inside a FormBuilder
<ion-item>
<ion-label>Event Start Date</ion-label>
<ion-datetime displayFormat="MM/DD/YY" formControlName="startDate" [ngClass]="{'has-error':!newEventForm.controls['startDate'].valid}"></ion-datetime>
</ion-item>
<ion-item>
<ion-label>Event End Date</ion-label>
<ion-datetime displayFormat="MM/DD/YYYY" formControlName="endDate" [ngClass]="{'has-error':!newEventForm.controls['endDate'].valid}"></ion-datetime>
</ion-item>
i have tried below but not working
this.newEventForm.controls["startDate"].setValue(Date.now());
How do i preset the date so the user does not need to move it alot