Skip to content

feat(react-calendar-compat): added reverse Date selection #34468

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

Conversation

ValentinaKozlova
Copy link
Contributor

Added reverse Date selection.

Previous Behavior

Selection was possible only in one direction

New Behavior

Added reverse param for negative date range selection

Related Issue(s)

#28961

@ValentinaKozlova ValentinaKozlova self-assigned this May 16, 2025
@ValentinaKozlova ValentinaKozlova added the Component: Calendar Compat Calendar Compat component label May 16, 2025
Copy link

github-actions bot commented May 16, 2025

📊 Bundle size report

Package & Exports Baseline (minified/GZIP) PR Change
react-calendar-compat
Calendar Compat
149.657 kB
39.908 kB
149.721 kB
39.948 kB
64 B
40 B
react-datepicker-compat
DatePicker Compat
227.304 kB
64.359 kB
227.371 kB
64.394 kB
67 B
35 B

🤖 This report was generated against 2ae40918b8d18d85c19fd1414154283d1e9e9b82

Copy link

Pull request demo site: URL

@@ -0,0 +1,7 @@
{
Copy link

@github-actions github-actions bot May 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🕵🏾‍♀️ visual changes to review in the Visual Change Report

vr-tests-react-components/Avatar Converged 1 screenshots
Image Name Diff(in Pixels) Image Type
vr-tests-react-components/Avatar Converged.badgeMask.normal.chromium.png 4 Changed
vr-tests-react-components/Positioning 2 screenshots
Image Name Diff(in Pixels) Image Type
vr-tests-react-components/Positioning.Positioning end.updated 2 times.chromium.png 611 Changed
vr-tests-react-components/Positioning.Positioning end.chromium.png 749 Changed
vr-tests-react-components/Skeleton converged 3 screenshots
Image Name Diff(in Pixels) Image Type
vr-tests-react-components/Skeleton converged.Opaque Skeleton with circle - High Contrast.default.chromium.png 1 Changed
vr-tests-react-components/Skeleton converged.Opaque Skeleton with rectangle - Dark Mode.default.chromium.png 29 Changed
vr-tests-react-components/Skeleton converged.Opaque Skeleton with rectangle.default.chromium.png 15 Changed
vr-tests-react-components/TagPicker 1 screenshots
Image Name Diff(in Pixels) Image Type
vr-tests-react-components/TagPicker.disabled - High Contrast.chromium.png 1321 Changed

There were 1 duplicate changes discarded. Check the build logs for more information.

@ValentinaKozlova ValentinaKozlova force-pushed the feat/date-picker-selection-date-range branch from f3b3278 to 9fa5e02 Compare May 21, 2025 16:57
@ValentinaKozlova ValentinaKozlova force-pushed the feat/date-picker-selection-date-range branch from 9fa5e02 to b5750a9 Compare May 21, 2025 17:06
@ValentinaKozlova ValentinaKozlova marked this pull request as ready for review May 22, 2025 08:11
@ValentinaKozlova ValentinaKozlova requested a review from a team as a code owner May 22, 2025 08:11
@@ -165,6 +165,7 @@ export function getDateRangeArray(
firstDayOfWeek: DayOfWeek,
workWeekDays?: DayOfWeek[],
daysToSelectInDayView: number = 1,
reverse?: boolean,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't like the idea of adding another parameter to this function as it's already pretty complex. Maybe it would be good to split it to get rid of so many parameters. But currently I did it according to existing style

@tudorpopams tudorpopams requested a review from dmytrokirpa May 22, 2025 12:02
@ValentinaKozlova
Copy link
Contributor Author

Closing this PR as there's a better approach: #34541

@ValentinaKozlova ValentinaKozlova deleted the feat/date-picker-selection-date-range branch June 5, 2025 15:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Calendar Compat Calendar Compat component
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant