• Resolved kare93

    (@kare93)


    Hello,

    I need your help. When i choose a date, i would like to disable the previous ones. How can i make this happen?

    I often use this code for contact form 7 and datepicker for contact form 7:

    /* code */
    function calendar_js(){
    ?>
    <script>
    jQuery(function($){
    var start = $(‘.date-417 input’).first();
    var end = $(‘.date-419 input’).first();

    start.on(‘change’, function() {
    var start_date = $(this).datepicker(‘getDate’);
    start_date.setDate(start_date.getDate() + 1);
    end.datepicker(‘option’, ‘minDate’, start_date);
    });
    });
    </script>
    <?php
    }
    add_action(‘wp_footer’, ‘calendar_js’);

    Thank you in advance.

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Plugin Author Fahad Mahmood

    (@fahadmahmood)

    You are asking for a custom script, this support forum is about plugin related features or problems.

    minDate : 0

    Should work for you, but as you are setting setting minDate to selection of previous input field. I would suggest you to post your problems on relevant support forum.

Viewing 1 replies (of 1 total)
  • The topic ‘Datepicker problem’ is closed to new replies.