#38106 closed defect (bug) (invalid)
wp_localize_jquery_ui_datepicker() bug
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Milestone: | Priority: | normal | |
| Severity: | normal | Version: | 4.6.1 |
| Component: | Script Loader | Keywords: | needs-patch reporter-feedback close |
| 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 (12)
#1
follow-up:
↓ 2
@
9 years ago
- Component changed from Widgets to Script Loader
- Focuses ui accessibility removed
- Keywords needs-patch added
#2
in reply to:
↑ 1
@
9 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
@
9 years ago
- Keywords has-patch added; needs-patch removed
..a few hours later
Can't say if patch is appropriate, just did it.
#4
@
9 years ago
- Keywords needs-patch added; has-patch removed
@Presskopp When comparing with the Pastebin, the patch doesn't look correct / complete
#7
@
9 years ago
- Keywords reporter-feedback added
@jjmpsp In your Pastebin you're referencing a custom jquery-ui-datepicker-custom.js script. The rest is identical to current WordPress core code. What exactly does your script include that fixes the issue you're experiencing?
#8
@
2 years ago
- Keywords close added
As there has been no reply in 7 years, I am marking this as a candidate for closure.
If there is no response in the next 30 days, this ticket will be closed. It can be reopened at any time in the future if needed.
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.