Opened 7 years ago
Last modified 6 years ago
#38106 new defect (bug)
wp_localize_jquery_ui_datepicker() bug
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Awaiting Review | Priority: | normal |
Severity: | normal | Version: | 4.6.1 |
Component: | Script Loader | Keywords: | needs-patch reporter-feedback |
Focuses: | javascript | Cc: |
Description
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:
A datepicker within my wordpress theme now shows UK formatted dates since implementing the fix.
Attachments (2)
Change History (9)
#1
follow-up:
↓ 2
@
7 years ago
- Component changed from Widgets to Script Loader
- Focuses ui accessibility removed
- Keywords needs-patch added
#2
in reply to:
↑ 1
@
7 years ago
Replying to swissspidy:
Hey there,
Thanks for your report and welcome to WordPress Trac!
Would you mind uploading your changes as a proper patch file? See https://make.wordpress.org/core/handbook/tutorials/working-with-patches/ for help.
Sure, I'll do this in a few hours (y)
#3
@
6 years ago
- Keywords has-patch added; needs-patch removed
..a few hours later
Can't say if patch is appropriate, just did it.
Hey there,
Thanks for your report and welcome to WordPress Trac!
Would you mind uploading your changes as a proper patch file? See https://make.wordpress.org/core/handbook/tutorials/working-with-patches/ for help.