I got the case when numVisibleItems is calculated as 6 instead of 7 days and that is ruins paged scrollable. I found that before Math.floor() being applied the raw value is 6.94 which, I believe, is ok since it's calculated upon rounded itemWidth & marginHorizontal values. But when you floor the numVisibleItems itself it ends up in wrong days & unexpected paging behavior. This PR suggests to replace Math.floor() with Math.round()
I got the case when
numVisibleItems
is calculated as 6 instead of 7 days and that is ruins paged scrollable. I found that beforeMath.floor()
being applied the raw value is 6.94 which, I believe, is ok since it's calculated upon roundeditemWidth
&marginHorizontal
values. But when you floor thenumVisibleItems
itself it ends up in wrong days & unexpected paging behavior. This PR suggests to replaceMath.floor()
withMath.round()
I suppose it also could be a fix for issue #269