Make WordPress Core

Opened 6 years ago

Last modified 4 years ago

#43028 new defect (bug)

Remove numbers before month in dropdown, it makes user confused when drowdown is not opened

Reported by: nilamacharya's profile nilamacharya Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 3.3
Component: Date/Time Keywords: has-screenshots has-patch needs-refresh
Focuses: ui, administration Cc:

Description

Bug: Remove numbers before month in dropdown, it makes user confused when drowdown is not opened

  1. Navigate to Header from left Rail
  2. Select "Header Media"
  3. Make anu changes
  4. Select "setting" icon near "publish" button from top
  5. Select "Schedule" radio button
  6. Check Date Field

Attachments (3)

wp dropdown.png (211.3 KB) - added by nilamacharya 6 years ago.
43028.patch (669 bytes) - added by zalu1512 6 years ago.
resolved dropdown issue
Date Selection Examples.jpg (325.8 KB) - added by mdwolinski 5 years ago.
Different Date Selection design patterns

Download all attachments as: .zip

Change History (16)

#1 @birgire
6 years ago

  • Focuses ui added
  • Keywords has-screenshots added
  • Version changed from 4.9.1 to 3.3

@nilamacharya Welcome to WordPress trac

I must admit that this has confused me too, as e.g. 01-jan looks like "1st of January" to me.

It seems to be generated within get_month_choices(), introduced in version 4.9:

$months[ $i ]['text']  = sprintf( __( '%1$s-%2$s' ), $i, $month_text );

https://core.trac.wordpress.org/browser/tags/4.9/src/wp-includes/customize/class-wp-customize-date-time-control.php#L194

On my test install it shows as a 1-jan format, compared to the 01-jan format when editing post dates. That's because only the latter is zeroised with: $monthnum = zeroise($i, 2);. At least these two should be using the same format (like jan, 1-jan or 01-jan) for the sake of constistency.

I checked the post date editing, and it's generated within the touch_time() function:

$month .= sprintf( __( '%1$s-%2$s' ), $monthnum, $monthtext ) . "</option>\n";

https://core.trac.wordpress.org/browser/tags/4.9/src/wp-admin/includes/template.php#L726

This 01-jan format was introduced in version 3.3:

For those people who have trouble converting numerical dates to text month names, let's amend the date picker month dropdown to include the month number as well, credit card form style.

See ticket #18838 and changeset [18860].

Version 5, edited 6 years ago by birgire (previous) (next) (diff)

#2 @zalak151291
6 years ago

$month_text = $wp_locale->get_month_abbrev( $wp_locale->get_month( $i ) );
$months[ $i ]['text']  = sprintf($month_text);
$months[ $i ]['value'] = $i;

#3 @zalu1512
6 years ago

Hi,

I have resoled month dropdown problem and please let me know if any other changes.

Thanks.

@zalu1512
6 years ago

resolved dropdown issue

#4 @nilamacharya
6 years ago

  • Keywords has-patch added

#5 @Rarst
6 years ago

  • Keywords ui-feedback added

This ticket was mentioned in Slack in #design by karmatosed. View the logs.


6 years ago

#7 @karmatosed
6 years ago

I can see how this could help for scanning and also accessibility. Are there any examples of how other sites do this we can lean on?

This ticket was mentioned in Slack in #design by karmatosed. View the logs.


5 years ago

#9 @mdwolinski
5 years ago

Per our discussion in #design, here are some current examples of Date input from across a couple of sites.

Facebook, Google and Gutenberg all allow entry and selection from calendar popover. Apple ID is typing in the date (which would have to account for the different ways people read dates, ie Month/Day/Year or Day/Month/Year).

Apple iOS (sorry, don't have an Android device) shows just the full month name without the month number.

I suspect, the current design is for type entries, ie tab to the field and hit 2 to bring up February.

Personally, I'd follow Gutenberg's design pattern.

@mdwolinski
5 years ago

Different Date Selection design patterns

#10 @Rarst
5 years ago

Related, but seemingly more broad, ticket #46366

This ticket was mentioned in Slack in #design by estelaris. View the logs.


4 years ago

#12 @ibdz
4 years ago

  • Keywords needs-patch added; has-patch ui-feedback removed

In design triage today, we agreed to follow the Gutenberg's design pattern - DateTime component. (https://developer.wordpress.org/block-editor/components/date-time/)

#13 @ibdz
4 years ago

  • Keywords has-patch needs-refresh added; needs-patch removed
Note: See TracTickets for help on using tickets.