If you would like to add a date time picker in your form, you need to use datetimepicker() function:

In template.php

<form id=”” name=”” action=”
<?php echo get_permalink(); ?>” method=”post”>
<input type=”text” id=”Date” name=”Date” value=””/>
<input type=”submit” value=”Submit” name=”submit”>

Now add WordPress js function:

add_action( ‘wp_print_footer_scripts’, function () {
<script type=”text/javascript”>
jQuery(document).ready(function() {
dateFormat : ‘dd-mm-yy’
}, 50 );

Please login or Register to submit your answer
Not the answer you are looking for? Browse other questions tagged or ask your own question.