I am using the NgbDatepicker
<ngb-datepicker #dp [(ngModel)]="scheduledStartDate" [ngModelOptions]="{standalone:true}">
</ngb-datepicker>
It can be done on ngAfterViewInit() like:
@ViewChild('dp') datepicker: NgbDatepicker;
ngAfterViewInit() {
this.datepicker.navigateTo({ year: new Date().getFullYear(), month: new Date().getMonth(), day: new Date().getDate() });
}
But is there a way to use navigateTo() on some other function ??