PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Block Calendar Dates using Jquery

  1. Chris
    Member

    I have a standalone form where the following code works just fine on the jquery ui datepicker I was using. I am looking to switch my standalone form to gravity forms on my wordpress install and am having trouble getting the jquery code to manipulate the datepicker within gravity forms.

    here is the code I had in the head area of my header

    http://pastebin.com/pCPMfCjJ

    This code worked fine blocking all the desired days when using the stand alone datepicker. For some reason, these won't modify the GF datepicker at all (yes the #input_17_1) is the id for the datepicker within GF and this code is in the header of my wordpress theme.

    Do you have any idea what changes I need to make to the code above to work with GF?

    Thanks

    Posted 12 years ago on Friday February 10, 2012 | Permalink
  2. Hi Chris,

    One thing I'd try is to destroy the default GF datepicker before you apply your own:

    [js]
    jQuery('#input_17_1').datepicker('destroy');
    Posted 12 years ago on Wednesday February 15, 2012 | Permalink