Make WordPress Core

Opened 22 months ago

Last modified 5 months ago

#43028 new defect (bug)

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

Reported by: nilamacharya Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 3.3
Component: Date/Time Keywords: has-screenshots has-patch ui-feedback
Focuses: ui, administration Cc:
PR Number:


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 22 months ago.
43028.patch (669 bytes) - added by zalu1512 22 months ago.
resolved dropdown issue
Date Selection Examples.jpg (325.8 KB) - added by mdwolinski 5 months ago.
Different Date Selection design patterns

Download all attachments as: .zip

Change History (13)

#1 @birgire
22 months 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 );


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";


This 01-jan format was introduced in version 3.3, where @jane writes:

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].

Last edited 22 months ago by birgire (previous) (diff)

#2 @zalak151291
22 months 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
22 months ago


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


22 months ago

resolved dropdown issue

#4 @nilamacharya
21 months ago

  • Keywords has-patch added

#5 @Rarst
16 months ago

  • Keywords ui-feedback added

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

16 months ago

#7 @karmatosed
16 months 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 months ago

#9 @mdwolinski
5 months 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.

5 months ago

Different Date Selection design patterns

#10 @Rarst
5 months ago

Related, but seemingly more broad, ticket #46366

Note: See TracTickets for help on using tickets.