Meta Box Datepicker

public function meta_box_1($post){
// Enqueue Datepicker + jQuery UI CSS
wp_enqueue_script('jquery-ui-datepicker');
wp_enqueue_style('jquery-ui-style','http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.1/themes/smoothness/jquery-ui.css',true);

//This is where the normal meta box stuff goes. Nonce, get_post_meta, etc

?>
<script type="text/javascript">jQuery(document).ready(function(){ jQuery('#presentation_date').datepicker({dateFormat : 'mm/dd/yy'}); });</script>
<?php
}

0 Comments

You must be logged in to post a comment.