Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question: Is it possible to get the first and last dates the calendar will display on a given month? #75

Open
alejo4373 opened this issue Aug 1, 2021 · 0 comments

Comments

@alejo4373
Copy link

I'm working on an app to visualize (highlight) my workdays in the calendar (they vary week to week). Right now, I fetch my workdays based on the month the calendar is set to. The challenge I'm facing is that if I work the week of September 27th (1 week before October) and want to see what days I'll be working the next week I have to advance the calendar month to October and my workday fetching functions will return the dates I'm working on October, and not September, and therefore the dates that display in the calendar from September won't be highlighted.

So, if the calendar had a way of communicating what is the start and end displayed date (for October 2021 that would be Sept 26 and Nov 6) I could use those dates to fetch my workdays in that range.

Screen Shot 2021-07-31 at 8 59 53 PM

I know that I could adjust my data fetching functions to always include one week before and one week after each month, but it would be quite convenient if the Calendar component offered the functionality I mentioned in the previous paragraph. Maybe the onMonthChange handler accepting a callback like (monthStartDate, startDisplayedDate, endDisplayedDate) => {...}??

✅ Also, really nice library! I'm interested in contributing, specially working on issue #3 if no one is already.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant