Skip to content

Using minDate input for the datepicker fails to fire the bsValueChange after first date clicked in v5.60+ #5888

Open
@charms9

Description

@charms9

After updating our app to angular 9 and ngx-bootstrap v5.6.1, we encountered an issue with the datepicker where the minDate being set causes the function supplied to (bsValueChange) to not get fired after the first time a date on the calendar is clicked. Removing the minDate attribute allows the function to be called as expected. We downgraded our ngx-bootstrap to v5.5.0 which allowed the minDate attribute to work, although it had to be changed from the output of a function call to a variable/object property.

In version 5.6.0 and up, the event fires the supplied bsValueChange function with the following:
<bs-datepicker-inline [bsValue]="displayDate" [bsConfig]="{showWeekNumbers: false}"
(bsValueChange)="updateDeadlineDate($event)" [maxDate]="calMaxDate">

...but not with
<bs-datepicker-inline [bsValue]="displayDate" [bsConfig]="{showWeekNumbers: false}"
(bsValueChange)="updateDeadlineDate($event)" [minDate]="minDate" [maxDate]="calMaxDate">

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions