Closed Cata1989 closed 4 weeks ago
hey i just made a PR that allows you to set pageBy="single"
, which i think should give you the behavior you want. see #50.
can you take a look at it?
Hey @WickyNilliams , thank you for taking the time to look into this.
Yes, I've reviewed the changes in the PR, particularly the testing part, and the pageBy
prop did the trick. I guess this solution will work great for us. Using pageBy="single" | "months"
, pagination will be independent of the months
prop, which is excellent.
That's right. I'll get this merged and released today
Released in 0.7.0
Just released 0.7.1
that contains some small enhancements to the pagination logic as i wasn't quite happy with how it behaved. It feels more natural now
Scenario:
I have a multi-selectable calendar with months="1" to display one month per next/prev button press. I aim to display two months at a time, moving one month forward/backward per button press (e.g., May/June => June/July).
Problem:
Selecting dates from the second displayed month causes the calendar to jump to the next month. Setting months="2" matches the elements and works correctly, but the prev/next buttons then jump two months (e.g., May/June => July/August), which is not desired.
CodePen Example: https://codepen.io/Catalin-Lungan/pen/JjqozOe
Expected Resolution:
Currently, it is expected that the 'months' prop matches the number of elements, as the pagination logic moves by the number of months specified. It would be very useful to have a setting that allows configuring the pagination to move by a custom number of months, which would resolve the issue we're experiencing.