wordpress implementing jquery ui datepicker

<?php
wp_enqueue_script(‘jquery-ui-datepicker’);
wp_enqueue_style(‘jquery-style’, ‘http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.2/themes/smoothness/jquery-ui.css’);
?>

<input type=”text” id=”MyDate” name=”MyDate” value=””/>

<script type=”text/javascript”>

jQuery(document).ready(function() {
jQuery(‘#MyDate’).datepicker({
dateFormat : ‘dd-mm-yy’
});
});

</script>

  Like
Author: bm on February 13, 2014
Category: wordpress

Your comment:

Your Name

Comment:




Last articles