Viewing 2 replies - 1 through 2 (of 2 total)
  • I do not quite understand. You want dates before checkin stay locked?
    See this example:
    http://jsfiddle.net/LLY3g/

    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
    }

    Hey paulo,

    I tried your method but it wasn’t quite working for me, which is probably me miss placing some code. I understand placing the

    add_action… at the end of the functions.php file, but the

    [text date-go id:checkin]
    [text date-back id:checkout]

    where exactly are you placing those? I already have an existing form and when I replace the

    [date arrivaldate 20/]
    [date departuredate 20/]

    no calendars pop up, any suggestions?

    Thank you

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Check-in and Check-out interaction for min-date’ is closed to new replies.