#38106 closed defect (bug) (invalid)
wp_localize_jquery_ui_datepicker() bug
| Reported by: | jjmpsp | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Script Loader | Version: | 4.6.1 |
| Severity: | normal | Keywords: | needs-patch reporter-feedback close |
| Cc: | Focuses: | javascript |
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
@
10 years ago
- Component Widgets → Script Loader
- Focuses ui accessibility removed
- Keywords needs-patch added
#2
in reply to: ↑ 1
@
10 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?
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
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.