Update available dates in datepicker based on another field [RESOLVED]

I am creating a form that allows users to book appointments.

The available dates depend on the value selected in a select, so they can change depending on the option chosen.

I see that with ‘gform_datepicker_options_pre_init’ I can make initial settings, but is it possible to update the configuration of the calendar depending on the value selected in the select?

Thank you.

Can you use multiple datepickers, each configured differently, and show a different datepicker with conditional logic based on the selection in the dropdown?

If not, or you have too many options for this to be practical, or the options are always changing, then you would need to use jQuery or JavaScript to change the init options for the datepicker once a change is made in the select field.

1 Like

Hi, Cris.

Yes, I already tried to modify the datepicker with jQuery, but I have not been able to access the instance created by Gravity Forms.

Forget it, I was just making the wrong call with jQuery.

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.