[wp-trac] [WordPress Trac] #29420: jQuery datepicker should be using the locale
WordPress Trac
noreply at wordpress.org
Fri Jun 24 10:24:21 UTC 2016
#29420: jQuery datepicker should be using the locale
-------------------------------------+-------------------------
Reporter: zodiac1978 | Owner: swissspidy
Type: enhancement | Status: assigned
Priority: normal | Milestone: 4.6
Component: I18N | Version:
Severity: normal | Resolution:
Keywords: has-patch needs-testing | Focuses: ui
-------------------------------------+-------------------------
Comment (by barryceelen):
Replying to [comment:28 zodiac1978]:
> > I've tried the patch from @ocean90 with Contact Form 7 and the HTML5
fallback (which just enqueues the jQuery datepicker) and besides the
mentioned problems it works very fine so far.
I installed Contact Form 7 to have a peek: Contact Form 7 sets the the
`dateformat` option to `yy-mm-dd` in its `scripts.js` file:
{{{
#!javascript
if (_wpcf7.jqueryUi && ! _wpcf7.supportHtml5.date) {
this.find('input.wpcf7-date[type="date"]').each(function() {
$(this).datepicker({
dateFormat: 'yy-mm-dd',
minDate: new Date($(this).attr('min')),
maxDate: new Date($(this).attr('max'))
});
});
}
}}}
This overrides the default being set by the patch. The defaults will only
apply if the plugin author does not set a value for any of the defaults.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/29420#comment:29>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list