Detect Change in Select in Angular

52 Views Asked by At

I have some difficulties logging the year when you select the year. I managed to hide the month and dates already though.

STACKBLITZ

Simple datepicker

<ngb-datepicker
  [(ngModel)]="model"
  (dateSelect)="onDateChange($event)"
></ngb-datepicker>
1

There are 1 best solutions below

0
D A On BEST ANSWER

I hope my answer will help you. Use (navigate)="navigateEvent($event)" instead.

navigateEvent(event) {
    console.log(event.next.year);
  }