Here´s something to get you started.
- Adapt the code below to your needs
- Create an init.js file with notepad and paste your code in there
- Save it in a logical place your theme folder (the JS directory for example)
- Register and enqueue this file (make sure to load it after jquery)
Datepicker set up:
/* http://codex.wordpress.org/Function_Reference/wp_enqueue_script#jQuery_noConflict_wrappers */
jQuery(document).ready(function($) {
/* For all options see http://jqueryui.com/demos/datepicker/ */
$("#datepicker").datepicker({
defaultDate: +2,
minDate: 0,
maxDate: '+2y',
numberOfMonths: 1,
showAnim: 'fadeIn',
showButtonPanel: true,
buttonImageOnly: true,
buttonText: 'Pick a date',
showOn: 'both'
});
});