ScrollToMonth() not working
Please make our job easier by filling this template out to completion. If you're requesting a feature instead of reporting a bug, please feel free to skip the Environment and Reproducible Demo sections.
Description
1-2 sentences describing the problem you're having or the feature you'd like to request.
Expected Behavior
Trying to get the calendar to auto-scroll to next month on componentDidMount but its not working
What action did you perform, and what did you expect to happen?
const { current } = this.target; const nextMonth = new XDate().addMonths(1); current?.scrollToMonth(nextMonth);
target is just a reference to the calendar
Observed Behavior
What actually happened when you performed the above actions?
Nothing happens. Calendar just stays on the first month
If there's an error message, please paste the full terminal output and error message in this code block:
Error text goes here!
Environment
Please run these commands in the project folder and fill in their results:
-
npm ls react-native-calendars: -
npm ls react-native:
Also specify:
- Iphone XR Ios
Reproducible Demo
Please provide a minimized reproducible demonstration of the problem you're reporting.
Issues that come with minimal repro's are resolved much more quickly than issues where a maintainer has to reproduce themselves.
Screenshots
Screenshots or gifs of the issue and the suggested fix will help us move faster with the review process.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.