Kumar-Aakash / ng-material-date-range-picker

MIT License
12 stars 6 forks source link

Changing Month on first calendar is not updating correctly the second calendar #4

Closed fpfcarvalho closed 8 months ago

fpfcarvalho commented 8 months ago

If we select a custom range, and we choose to change Month through the Year View and not the arrows, the second calendar will calculate the selected month + 1 but the table with the days will remain with the initial data.

Captura de ecrã 2024-03-06, às 18 45 47

In my opinion, the header of the second calendar shouldn't change and should stay with the previous selected date and not recalculating

Kumar-Aakash commented 8 months ago

Hi, @fpfcarvalho Thank you for using the Library and opening the issue.

Based on the use cases we have, we have decided to keep it as functionality where if you change the starting month using the arrow, the subsequent 2nd-month selector goes +1.

It does help primarily in selecting a date range that is always in the future direction from the starting date selected.

If you're still facing issues where the output event date range is not correct, can you please provide me a minimal reproducible issue or a loom, It might help me understand the issue better.

fpfcarvalho commented 8 months ago

Hi @Kumar-Aakash . Thank you for your reply. Well if you go with that option, the issue is if you look to my screenshot, the header of the second calendar is pointing to February 2020 but the days on that calendar are still showing the April 2024. That was reproducible on your demos (the screenshot is from there too)

Check this video and you will be able to see the issue.

https://github.com/Kumar-Aakash/ng-material-date-range-picker/assets/272719/e9cdcc89-451d-468c-8b82-dd67a9cdba0a

Kumar-Aakash commented 8 months ago

Hi @fpfcarvalho Thank you for providing issue video.

I should be fixing this over the weekend. I will inform here, once done. Thanks

Kumar-Aakash commented 8 months ago

@fpfcarvalho This is tracked here PR-6

Kumar-Aakash commented 8 months ago

hi @fpfcarvalho This issue is fixed in lib version 2.2.1 (for angular 17) and 1.2.7 (for angular 16) You may check on below demo url: https://techtose-ng-date-range-picker.netlify.app/dashboards/analytics

Kumar-Aakash commented 8 months ago

Fixed this issue in v2.2.1 via 132f96dd8