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

calendarStartDay and showWeekPicker, selected week is not active #4455

Closed
vellov opened this issue Jan 14, 2024 · 0 comments · Fixed by #4609
Closed

calendarStartDay and showWeekPicker, selected week is not active #4455

vellov opened this issue Jan 14, 2024 · 0 comments · Fixed by #4609

Comments

@vellov
Copy link

vellov commented Jan 14, 2024

Describe the bug
A clear and concise description of what the bug is.
When showWeekPicker is set true and calendarStartDay is set to 1, then only the first day of the week gets active state.
If calendarStartDay prop is removed it works as intended.

To Reproduce
Steps to reproduce the behavior:

  1. Create datepicker as following:
  2. <DatePicker selected={date} startDate={x} onChange={setDate} showWeekPicker={true} />
  3. Check that after selecing week and reopening calendar it is in selected state
  4. add calendarStartDay prop: <DatePicker calendarStartDay={1} selected={x} startDate={x} onChange={setX} showWeekPicker={true} />
  5. select week
  6. selected week is not in active state

Expected behavior
A clear and concise description of what you expected to happen.
selected week should be in active state

Screenshots
If applicable, add screenshots to help explain your problem.
Screenshot 2024-01-14 at 23 53 56
Screenshot 2024-01-14 at 23 54 21

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

@vellov vellov changed the title calendarStartDay and showWeekPicker, selected week not working calendarStartDay and showWeekPicker, selected week is not active Jan 14, 2024
yuki0410-dev added a commit to yuki0410-dev/react-datepicker that referenced this issue Mar 18, 2024
yuki0410-dev added a commit to yuki0410-dev/react-datepicker that referenced this issue Mar 18, 2024
yuki0410-dev added a commit to yuki0410-dev/react-datepicker that referenced this issue Mar 18, 2024
martijnrusschen added a commit that referenced this issue Mar 19, 2024
fix: #4455 Pass calendarStartDay props from week to day.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant