Created
February 28, 2017 16:49
An example of how you can change the dateform used by the EE datepicker question type.
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 if you already have one. | |
//A function to change the dateFormat used by the datepicker on the checkout page. | |
function tw_ee_datepicker_date_format() { | |
if( is_page( 'registration-checkout' ) ) { | |
wp_add_inline_script( 'jquery-ui-datepicker', "jQuery(document).ready(function(jQuery){jQuery('.ee-reg-qstn.datepicker').datepicker({ dateFormat: 'MM d, yy' })});" ); | |
} | |
} | |
add_action( 'wp_enqueue_scripts', 'tw_ee_datepicker_date_format', 1200, 1); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment