Open
Description
Bug description:
In inline date range picker two calendar view all 4 button arrows to change month are visible when both min date and max date have same month.
StackBlitz: https://stackblitz.com/edit/angular-xfptm6?file=src/main.ts
Versions of ngx-bootstrap, Angular, and Bootstrap:
ngx-bootstrap: 10.3.0
Angular: 15.2.9
Bootstrap: 5.2.3
Expected behavior
Only 2 arrows to change month to be visible, it should look the same as when you comment out min date or max date in config.
Additional info
This function seems to be a problem, but I don't know why it check for it because for me one month display does not depend on min/max date.
function isDisplayOneMonth(viewDate: Date, minDate?: Date, maxDate?: Date) {
if (maxDate && isSame(maxDate, viewDate, 'day')) {
return true;
}
return minDate && maxDate && minDate.getMonth() === maxDate.getMonth();
}