In WordPress > Settings > General screen I’ve defined the date format to d.m.Y
In the event form in the frontend the date format is m/d/Y. How can I change this? Many people of our website have problems with this m/d/Y format…
Hi Josh,
thanks for your quick reply! It does not work. Made I a mistake?
I created a Plugin, insert your Code and activated the plugin in WP. The Code:
<?php
/*
Plugin Name: Datumswandler für EventEspresso
Description: ändert das Datum im EventEspresso-Frontend bei Datepicker um in tt.mm.jjjj
*/
/* Begin Adding Functions Below This Line; Do not include an opening PHP tag as this sample code already includes one! */
function jf_change_ee_reg_form_datepicker_format() {
if ( is_page( 'registration-checkout' ) ) {
?>
<script>
jQuery(document).ready(function($) {
$('.datepicker').datepicker({
changeYear: true,
yearRange: "1960:2016", // for more info see http://api.jqueryui.com/datepicker/#option-yearRange
dateFormat: 'dd.mm.yyyy'
});
});
</script>
<?php
}
}
add_action( 'wp_footer', 'jf_change_ee_reg_form_datepicker_format' );
/* Stop Adding Functions */
In the Frontend after I use the date picker (for birthday), the date has the format m/d/Y.
Checks for a page called ‘registration-checkout’, looking over your site it appears you don’t have this page. It looks like you need to change that line to:
The support post ‘Date format’ is closed to new replies.
Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.
Support forum for Event Espresso 3 and Event Espresso 4.