react-datepicker
react-datepicker copied to clipboard
✨ Add a support for `visibleYearsRange` in the `renderCustomHeader` of the YearPicker
Description
Linked issue: #5644
As mentioned in the ticket, I added a support for visibleYearsRange in the renderCustomHeader of the YearPicker. This prop will be only available when the showYearPicker prop is set and it provides the startYear and the endYear.
Changes
- Updated
ReactDatePickerCustomHeaderPropswith the optionalvisibleYearsRangeprop - Include
visibleYearsRangewhen callingrenderCustomHeaderfor the YearPicker View - Testcases to validate the change
Contribution checklist
- [x] I have followed the contributing guidelines.
- [x] I have added sufficient test coverage for my changes.
- [x] I have formatted my code with Prettier and checked for linting issues with ESLint for code readability.
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 97.15%. Comparing base (
6e0b763) to head (b104d69). Report is 48 commits behind head on main.
Additional details and impacted files
@@ Coverage Diff @@
## main #5687 +/- ##
==========================================
+ Coverage 97.11% 97.15% +0.03%
==========================================
Files 30 30
Lines 3363 3369 +6
Branches 1404 1422 +18
==========================================
+ Hits 3266 3273 +7
+ Misses 97 94 -3
- Partials 0 2 +2
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
- :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.