Ngx-bootstrap: Inline datepicker not refreshing after min/max date have changed

Created on 19 Jun 2019  路  3Comments  路  Source: valor-software/ngx-bootstrap

Bug description or feature request:

I'm trying to use the ngx-bootstrap library to create a full date+time range picker using the Inline Datepicker and the Timepicker.

I'm using two Inline Datepicker instances, one for the inferior date and other for the superior date. Whenever a date is selected in the inferior date picker, that date must be set as the minDate of the superior date picker, and vice versa. The problem is that whenever the minDate property changes, the new enabled/disabled dates in the superior picker are not refreshed until the mouse hovers over any previously enabled date.

StackBlitz that reproduces the issue:

StackBlitz: https://stackblitz.com/edit/angular-fk9pfe

Versions of ngx-bootstrap, Angular, and Bootstrap:

ngx-bootstrap: 5.0.0

Angular: 8.0.1

Bootstrap: 4.3.1

Build system: Angular CLI, System.js, webpack, starter seed:

Angular CLI

comp(datepicker) issue

Most helpful comment

I will update minDate, maxDate, and datesDisabled to work like bsValue for the inline datepicker. Please assign me to this issue

All 3 comments

This has been posted as a stackoverflow question here: https://stackoverflow.com/q/56671637/5994580

Thanks to @maihannijat for your answer. Apparently this seems to be a bug, checking the inline datepicker source the bsValue property behaves differently from the others, emitting an event each time it is updated and updates the underlying datepicker reference instance value.

I think this behavior should be extended to other properties as minDate, maxDate and datesDisabled.

I will update minDate, maxDate, and datesDisabled to work like bsValue for the inline datepicker. Please assign me to this issue

according to #5678 this issue is still reproducible in the latest version (currently, 5.5.0)

PR with new fix was added #5681

Gonna reopen it for now

Was this page helpful?
0 / 5 - 0 ratings