Date of arrival and date of depart
-
Hello,
i would like to know how i can set the minimum date from the field ” Date of departure”
to the value ” Date of arrival + 1day”
actually ,it works because i use the plugin “Contact Form 7 Datepicker” and i put this in my functions.php:// WordPress custom function function my_custom_function(){ ?> <script> jQuery(function($){ jQuery("#date1").datepicker({ dateFormat: 'dd/mm/yy', onSelect : function (selected) { var unique = jQuery(this).attr('id'); unique = unique.replace('date1', ''); var date = jQuery(this).datepicker('getDate'); if (date) { date.setDate(date.getDate() + 1); } jQuery( '#date2' + unique).datepicker( 'option', 'minDate', date) } }); }); </script> <?php } add_action('wp_footer', 'my_custom_function');
Is there a way to do this without the plugin “Contact Form 7 Datepicker” ?
Thanks for your answer!
The page I need help with: [log in to see the link]
- The topic ‘Date of arrival and date of depart’ is closed to new replies.