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!
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
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?
Hi Ismael, scratch that. I pasted it way too early in the document. Thanks a lot as always! Fantastic help! Thank you!