Created
October 29, 2013 11:59
-
-
Save mikejolley/7213366 to your computer and use it in GitHub Desktop.
Enqueue a script which uses a jquery ui datepicker http://jqueryui.com/datepicker/
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
add_action( 'wp_enqueue_scripts', 'custom_enqueue_datepicker' ); | |
function custom_enqueue_datepicker() { | |
// Optional - enqueue styles | |
wp_enqueue_style( 'jquery-ui', 'http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.21/themes/smoothness/jquery-ui.css', false, '1.0', false ); | |
// Enqueue YOURTHEME/js/datepicker.js | |
wp_enqueue_script( 'your-datepicker-script', get_stylesheet_directory_uri() . '/js/datepicker.js', array( 'jquery', 'jquery-ui-datepicker' ), '1.0', true ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment