Have you tried adding the gform_datepicker_options_pre_init script to an HTML field in the form where you want it to apply? It will be applied before the form is submitted. The other way to add the script is be enqueuing a custom JavaScript file. Adding the script to the footer.php is not a supported method of adding the script for your datepicker.
Hi,
" script to an HTML field in the form where you want it to apply?" don’t understand how, tried to add html field and put gform code on it but it’s showed as text…
Hello @ilanb - you will need to add the opening <script> tag and closing </script> tag around the actual script when you add it to an HTML field in the form. Otherwise, it will show up as text, as you saw.
If you add an HTML field to the form, and in the dashboard form editor, add the script enclosed by <script> and </script> tags, it should work. Saving the form with script tags in the HTML field works for me. If that is not working for you, I recommend opening a support ticket: https://www.gravityforms.com/support/
Please take a look at this article for alternate ways to add the script to your site if you do not want to open a support ticket: