[wp-trac] [WordPress Trac] #38106: wp_localize_jquery_ui_datepicker() bug

WordPress Trac noreply at wordpress.org
Tue Sep 20 13:10:56 UTC 2016


#38106: wp_localize_jquery_ui_datepicker() bug
-------------------------------------------+-----------------------------
 Reporter:  jjmpsp                         |      Owner:
     Type:  defect (bug)                   |     Status:  new
 Priority:  normal                         |  Milestone:  Awaiting Review
Component:  Widgets                        |    Version:  4.6.1
 Severity:  normal                         |   Keywords:
  Focuses:  ui, accessibility, javascript  |
-------------------------------------------+-----------------------------
 jQuery UI datepicker widget plugin customisation script has bugs.

 To reproduce the bug, simply add a datepicker to the page and Wordpress
 will format the datepicker with a US date by default, rather than using
 the config from core.

 {{{
 $(".date-input").datepicker({
     dateFormat: 'yy-dd-mm'
 });
 }}}


 I have fixed the function wp_localize_jquery_ui_datepicker(), please see
 the following pastebin with the corrected code:

 http://pastebin.com/dkxMSNsV

 A datepicker within my wordpress theme now shows UK formatted dates since
 implementing the fix.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/38106>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list