WordPress.org

Make WordPress Core

Opened 5 months ago

Closed 3 weeks ago

Last modified 3 weeks ago

#52664 closed defect (bug) (reported-upstream)

Sort order of datetime picker's date items

Reported by: tmatsuur Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Editor Keywords:
Focuses: ui, javascript Cc:

Description

I thought about the sort order of the date items in the datetime picker to be in the same order as the format specification that is set.

Currently, the date field is displayed in the order of "Day", "Month", and "Year" when the time format is a 12-hour clock, and "Month", "Day", and "Year" when it is a 24-hour clock.

If the date format is in the order of "Year", "Month", and "Day", such as "Y-m-d", it would be more comfortable if the items for each of "Year", "Month", and "Day" were also in the same order.

Attachments (3)

trac20210226_01a.png (10.9 KB) - added by tmatsuur 5 months ago.
52664.diff (7.7 KB) - added by tmatsuur 4 months ago.
52664-2.diff (9.1 KB) - added by tmatsuur 4 months ago.

Download all attachments as: .zip

Change History (8)

#1 @tmatsuur
5 months ago

I can fix it by modifying editor.js and components.js, but there are differences between 5.6.2 and 5.7 RC1, so I can't make a common patch.

If I attach a patch, which version should I target?

@tmatsuur
4 months ago

#2 @tmatsuur
4 months ago

I made a patch for version 5.7.0.

@tmatsuur
4 months ago

#3 @tmatsuur
4 months ago

The patch file has been updated because the display contents have been adjusted.

#4 @sabernhardt
3 weeks ago

  • Milestone Awaiting Review deleted
  • Resolution set to reported-upstream
  • Status changed from new to closed
  • Type changed from feature request to defect (bug)

This was reported on GitHub, too: https://github.com/WordPress/gutenberg/issues/17970

Thanks for creating patches! Because this is within the block editor, though, the correction will involve editing the React file(s) in a pull request. If you're interested in doing that and/or continuing the discussion, please comment on the GitHub issue.

#5 @tmatsuur
3 weeks ago

Thanks @sabernhardt

I'll consider this one.

Note: See TracTickets for help on using tickets.