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

Post Date popover doesn't respect 'Week Starts On' setting #41078

Closed
noisysocks opened this issue May 16, 2022 · 4 comments · Fixed by #41648
Closed

Post Date popover doesn't respect 'Week Starts On' setting #41078

noisysocks opened this issue May 16, 2022 · 4 comments · Fixed by #41648
Assignees
Labels
[Feature] Document Settings Document settings experience Good First Issue An issue that's suitable for someone looking to contribute for the first time [Type] Bug An existing feature does not function as intended

Comments

@noisysocks
Copy link
Member

Description

The calendar component in the Post Date popover does not respect the 'Week Starts On' WordPress setting.

Step-by-step reproduction instructions

  1. Go to WP Admin → Settings → General.
  2. Change 'Week Starts On' to e.g. Monday.
  3. Save changes.
  4. Create a new post.
  5. Open the sidebar and click on Immediately next to Publish to open the Post Date popover.

The calendar component has Sunday as the first day of the week, regardless of the setting that you chose.

Screenshots, screen recording, code snippet

Screen Shot 2022-05-16 at 11 27 13

Screen Shot 2022-05-16 at 11 27 09

Environment info

No response

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

Yes

@noisysocks noisysocks added [Type] Bug An existing feature does not function as intended [Feature] Document Settings Document settings experience labels May 16, 2022
@sabernhardt
Copy link
Contributor

This was also reported on Trac with WordPress 6.0, and the behavior apparently changed between 5.8 and 5.9 (without the Gutenberg plugin).

  • WordPress 5.8: The datepicker week started according to my setting (I tried both Monday and Wednesday).
  • WordPress 5.9: The datepicker week started on Sunday when I set it to Monday.

The bug is probably still worth fixing in a minor version.

@noisysocks noisysocks added the Good First Issue An issue that's suitable for someone looking to contribute for the first time label Jun 8, 2022
@noisysocks
Copy link
Member Author

From memory, the react-dates component we use has a weekStartsOn property, so this should hopefully just be a matter of hooking that up to the setting we get from __experimentalGetSettings() in @wordpress/date.

@goaround
Copy link

@noisysocks Any chance to get the fix into WordPress 6.0.2? I thought it will be in 6.0.1 but unfortunately, it's not.

@noisysocks noisysocks added Backport to WP Minor Release Pull request that needs to be backported to a WordPress minor release and removed Backport to WP Minor Release Pull request that needs to be backported to a WordPress minor release labels Jul 14, 2022
@noisysocks
Copy link
Member Author

I think it's best to wait until WordPress 6.1 to release this as the fix is not trivial (there are some Core changes that need to be applied at the same time) and the bug is not a recent regression.

@priethor priethor removed the [Status] In Progress Tracking issues with work in progress label May 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Document Settings Document settings experience Good First Issue An issue that's suitable for someone looking to contribute for the first time [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants