Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #435943

    Hi there,

    I would like to disable the user from typing in the date on the restaurant reservation form datepicker as I’ve already set the date picker to only allow a 7 days in advance booking.

    So the current issue is that the user can get around the datepicker by typing in an earlier date. I would like to disable that.

    Thank you!

    • This topic was modified 8 years, 11 months ago by jasksks.
    #436629

    Hey Jon!

    Thank you for using Enfold.

    Add this in the functions.php file:

    add_action('wp_footer', 'ava_custom_script', 10);
    function ava_custom_script(){
    ?>
    <script>
    (function($){
    	$('.avia_datepicker').attr('readonly','readonly');
    }(jQuery));
    </script>
    <?php
    }

    Cheers!
    Ismael

    #436742

    Hi Ismael,

    thank you for the code. I pasted it in functions.php but ended up with this line Parse error: syntax error, unexpected T_FUNCTION in /home/thaivill/public_html/wp-content/themes/enfold/functions.php on line 96

    Is there somewhere else I should have pasted it?

    #436744

    Hi Ismael, scratch that. I pasted it way too early in the document. Thanks a lot as always! Fantastic help! Thank you!

    #437276

    Hi!

    Great, glad you got it fixed :)

    Best regards,
    Rikard

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Reservation Form Datepicker Disable Typing In Date’ is closed to new replies.