[wp-trac] [WordPress Trac] #46596: WP_Customize_Date_Time_Control class - date format ignores day of the month suffix (S)
WordPress Trac
noreply at wordpress.org
Sun Jan 25 10:56:49 UTC 2026
#46596: WP_Customize_Date_Time_Control class - date format ignores day of the month
suffix (S)
-------------------------------------------------+-------------------------
Reporter: F.Ilona | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting
| Review
Component: Customize | Version: 4.7
Severity: normal | Resolution:
Keywords: has-patch needs-testing reporter- | Focuses:
feedback has-screenshots |
-------------------------------------------------+-------------------------
Changes (by ozgursar):
* keywords: has-patch needs-testing => has-patch needs-testing reporter-
feedback has-screenshots
Comment:
== Reproduction Report
=== Environment
- WordPress: 7.0-alpha-61215-src
- PHP: 8.2.29
- Server: nginx/1.29.4
- Database: mysqli (Server: 8.4.7 / Client: mysqlnd 8.2.29)
- Browser: Chrome 144.0.0.0
- OS: macOS
- Theme: Twenty Twenty-One 2.7
- MU Plugins: None activated
- Plugins:
* Code Snippets 3.9.4
* Test Reports 1.2.1
=== Steps taken
1. Choose any classic theme
2. Add the following snippet via Code Snippets plugin or via functions.php
{{{
/**
* Test for WP_Customize_Date_Time_Control date format bug
*/
add_action( 'customize_register', function( $wp_customize ) {
// Add a test section
$wp_customize->add_section( 'test_datetime_section', array(
'title' => 'Date Time Test',
'priority' => 30,
) );
// Add a test setting
$wp_customize->add_setting( 'test_datetime_setting', array(
'default' => current_time( 'Y-m-d H:i:s' ),
'transport' => 'postMessage',
) );
// Add the Date Time Control
$wp_customize->add_control( new WP_Customize_Date_Time_Control(
$wp_customize, 'test_datetime_control', array(
'label' => 'Test Date Time Control',
'section' => 'test_datetime_section',
'settings' => 'test_datetime_setting',
'description' => 'Check the date format issue for the S suffix',
) ) );
} );
}}}
3. Change the date/time format to check for dd/mm/yyy or mm/dd/yyyy
formats separately
4. Go to Appearance > Customize > Date Time Test
5. View the date field for the S suffix
6. ❌ Bug is not occurring
=== Expected behavior
- According to the ticket information S suffix should have displayed next
to date field but it did not appear.
=== Screenshots/Screencast with results
[[Image(https://i.imgur.com/uS0sf0u.png)]]
[[Image(https://i.imgur.com/CUmf27F.png)]]
--
Ticket URL: <https://core.trac.wordpress.org/ticket/46596#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list