[wp-trac] [WordPress Trac] #50040: Localize the jQuery datepicker when enqueued in the footer

WordPress Trac noreply at wordpress.org
Tue Sep 16 14:30:19 UTC 2025


#50040: Localize the jQuery datepicker when enqueued in the footer
-------------------------------------------------+-------------------------
 Reporter:  jadpm                                |       Owner:  (none)
     Type:  defect (bug)                         |      Status:  new
 Priority:  normal                               |   Milestone:  Awaiting
                                                 |  Review
Component:  I18N                                 |     Version:
 Severity:  normal                               |  Resolution:
 Keywords:  needs-patch good-first-bug           |     Focuses:
  reporter-feedback                              |
-------------------------------------------------+-------------------------
Changes (by gautam23):

 * keywords:  needs-patch good-first-bug => needs-patch good-first-bug
     reporter-feedback


Comment:

 == Reproduction Report
 === Description
 This report validates whether the issue can be reproduced.

 === Environment
 - WordPress: 6.9-alpha-60093-src
 - PHP: 8.2.28
 - Server: nginx/1.29.1
 - Database: mysqli (Server: 8.4.6 / Client: mysqlnd 8.2.28)
 - Browser: Chrome 140.0.0.0
 - OS: macOS
 - Theme: Twenty Sixteen 3.6
 - MU Plugins: None activated
 - Plugins:
   * Test Reports 1.2.0

 === Steps taken

 1. Activated a default theme (twenty-sixteen)
 2. Changed site language to Gujarati
 3. Added this to functions.php:

 {{{#!php
 <?php
 add_action('wp_enqueue_scripts', 'enqueue_footer_datepicker');
 function enqueue_footer_datepicker() {
     // Enqueue jQuery UI Datepicker in the footer
     wp_enqueue_script('jquery-ui-datepicker', '', [], false, true);

     // Enqueue jQuery UI CSS (optional, for styling)
     wp_enqueue_style('jquery-ui-style',
 '//code.jquery.com/ui/1.13.2/themes/base/jquery-ui.css');
 }
 }}}

 4. Added this to footer.php inside existing markup:

 {{{
 <input type="text" id="datepicker" />

     <script>
     jQuery(document).ready(function($) {
         $("#datepicker").datepicker();
     });
     </script>
 }}}

 5. Visited frontend and tested the new date-picker in footer.


 === Actual Results
 1.  ❌ Error condition does not occur (not-reproduced).
 2. The date-picker in footer is localized.

 === Additional Notes
 I'm not sure if my reproduction steps are correct, but this is what I
 inferred from the ticket.

 === Supplemental Artifacts
 [[Image(https://i.ibb.co/sJsCNhwW/Screenshot-2025-09-16-at-7-57-59-PM.png)]]

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/50040#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list