(select) event for NgbInputDatepicker

Feature Request

(select)-Output on the -Element on which the NgbInputDatepicker is bound to.

Right now, there is no way to detect if a user has selected a date from the datepicker: https://stackoverflow.com/questions/48903442

Link to minimally-working plunker that reproduces the issue:


Version of Angular, ng-bootstrap, and Bootstrap:

Angular: 5.2.0

ng-bootstrap: 1.0.0-beta.9

Bootstrap: 4.0.0

2 thoughts on “(select) event for NgbInputDatepicker

  1. Might not be a good idea to use(select) maybe, as it already exists on the input.

    I suggest we add the following:

    @Output() dateSelect = new EventEmitter<NgbDateStruct>();
    <input ngbDatepicker (dateSelect)="onDateSelect($event)" />

    Also deprecate existing (select) event and rename it to (dateSelect) on the non-input datepicker for consistency