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

Align endDate with End of Week When Using selectsRange and showWeekPicker #5319

Open
sp-95 opened this issue Jan 14, 2025 · 1 comment
Open

Comments

@sp-95
Copy link

sp-95 commented Jan 14, 2025

I'm using the selectsRange prop with showWeekPicker. The problem is that the endDate always defaults to the start of the week, which doesn't make sense in the context of a week picker.

When using the selectsRange prop with showWeekPicker, the endDate should automatically default to the last day of the week (e.g., Sunday in a week that starts on Monday or Saturday in a week that starts on Sunday). It would be more intuitive and user-friendly if the endDate automatically defaulted to the end of the week instead.

Alternatives considered

  1. Manually calculating the end of the week after the user selects the start date and overriding the endDate programmatically.
  2. Using a custom onChange handler to adjust the endDate after selection.

Both of these cases feels like a workaround that adds an extra unnecessary step.

@sp-95
Copy link
Author

sp-95 commented Jan 14, 2025

Additional Issue with showWeekPicker and showWeekNumbers

While working with the weekPicker feature, I noticed a separate issue when showWeekNumbers is enabled. Currently, it's possible to click on a week number even when all the dates within that week are excluded or disabled. This behavior can be confusing for users because the week number appears selectable when it shouldn't be.

Feature requests:

  • Week numbers where all dates in the corresponding week are excluded (disabled) should also be disabled.
  • There should be a visual distinction between enabled and disabled week numbers for better usability.

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