hernansartorio / hernansartorio/react-nice-dates
Question: Is it possible to get the first and last dates the calendar will display on a given month?
- Dominant language
- JavaScript
- Stars
- 1.1k
- Forks
- 77
- PR merge metrics
- No merged PRs in 30d
Description
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.

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.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.