You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The text was updated successfully, but these errors were encountered:
dstj
changed the title
When using [startDate], previous/next month navigation does not work
When using DatePicker.startDate, previous/next month navigation does not work
May 6, 2019
As [startDate] is a binding and you're returning a new object every time from the getStartDate() method, you're forcing datepicker to go to this date every time change detection happens.
So if you were to return the same date object, you wouldn't have this issue:
@maxokorokov, right, I should have suspected that, my bad! I assumed somehow that there would be some kind of equality comparaison on the NgbDateStruct instead of only a reference check.
Bug description:
When setting
[startDate]
on a DatePicker as specified in the doc, the navigation the previous or next month no longer work.When using the alternative
navigateTo()
, it works.Note: I can't
navigateTo()
because I want the datepicker in a ngbPopover (also in the repro)Link to minimally-working StackBlitz that reproduces the issue:
https://stackblitz.com/edit/angular-xtasaf
Versions of Angular, ng-bootstrap and Bootstrap:
"@angular/core": "^7.2.5",
"@ng-bootstrap/ng-bootstrap": "^4.1.2",
"bootstrap": "^4.3.1",
The text was updated successfully, but these errors were encountered: