Create inputs with id checkin and checkout:
Exemplo contact form 7:
[text date-go id:checkin]
[text date-back id:checkout]
Put it in the functions.php file:
add_action(‘wp_head’, ‘ativa_data’);
function ativa_data(){
?>
<script type=”text/javascript”>
jQuery(function() {
jQuery(“#checkin”).datepicker({
dateFormat: ‘yy/mm/dd’,
minDate: new Date(),
onSelect: function() {
jQuery(“#checkout”).datepicker(‘option’,’minDate’,jQuery(“#checkin”).datepicker( “getDate” ));
}
});
jQuery(“#checkout”).datepicker({
dateFormat: ‘yy/mm/dd’,
minDate: new Date()
});
});
</script>
<?php