Last active
February 13, 2016 00:45
-
-
Save joshfeck/e7a461c24fe75f6decaa to your computer and use it in GitHub Desktop.
Change the Event Espresso 4 datepicker format so dates are formatted like 31/01/2016 (dd/mm/yyyy)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//* Please do NOT include the opening php tag, except of course if you're starting with a blank file | |
function jf_change_ee_reg_form_datepicker_format() { | |
?> | |
<script> | |
jQuery(document).ready(function($) { | |
$('.datepicker').datepicker({ | |
changeYear: true, | |
yearRange: "1960:2010", // for more info see http://api.jqueryui.com/datepicker/#option-yearRange | |
dateFormat: 'dd/mm/yy' | |
}); | |
}); | |
</script> | |
<?php | |
} | |
add_action( 'AHEE__SPCO__reg_form_footer', 'jf_change_ee_reg_form_datepicker_format', 10 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment