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.

Possible to apply custom filters to date picker on each individual form?

  1. ageshi
    Member

    Hello,

    I have read the forum regarding customization of the date picker. I understand that it is based on JQuery UI and with a piece of code I can control the selectable dates.

    However, I'm using Gravity forms for reservation of multiple events being scheduled for different days. For example, if I have 4 different forms, I want each form to display their own set of available dates on the date picker.

    Would this be possible if I apply a different filtering script, under custom fields in WP, on every page/post of my forms?

    In other words, I'm trying to figure out a way to not to edit my theme template files and instead apply individualized customization to each form's date picker.

    I'd really appreciate any help on this!

    Thanks!

    Andrew

    Posted 12 years ago on Friday November 18, 2011 | Permalink
  2. I'm not 100% sure the best way for you to do this without editing your themes. I guess it would be possible to do it by inserting the custom javascript in a custom field for the page/post, but your theme would then have to output the value of that custom field on the page.

    Posted 12 years ago on Friday November 18, 2011 | Permalink
  3. ageshi
    Member

    Thanks for your reply Carl,

    This is what I really want to be able to do with the datepicker. I think this should be strongly considered for the next update of Gravity Forms:

    1. Allow the admin to restrict certain dates from the jQuery datepicker. The ability to only enable the dates or the Range of Dates specified by the admin from the datepicker options.
    Please see mock-up screenshot: http://www.synues.com/stage/Figure-A-example.jpg

    Example 1: I create a form, I include a date option. Within the datepicker options, I select the range 25-11-2011 and 27-11-2011. On the website when a visitor goes to the form, they will only be able to select 26-11-2011 from the date picker.

    Example 2: I create a form, I include a date option. Within the datepicker options, I select the range 21-11-2011 and 25-11-2011. But I should also have a checkbox beside it and say: "For Every Week". On the website when a visitor goes to the form, they will only be able to select the range of 5 days for every week of the year.

    I'd appreciate any help on how or if this can be done.

    Regards,
    Andrew

    Posted 12 years ago on Monday November 21, 2011 | Permalink
  4. Thanks for the input, we definitely plan on enhancing the Date Field in the future. We also want to implement range functionality so the Date Field can be used to set a start and end date and they would interact with each other to know the end date must be after the start date, etc. So enhancing date functionality is on our list of things to do.

    Posted 12 years ago on Monday November 21, 2011 | Permalink
  5. jcmorrisdesign
    Member

    I am also interested in this feature. In the meantime, do you think it would be possible to do so if I were to add a script to the backend?

    Posted 12 years ago on Thursday January 12, 2012 | Permalink
  6. I would also like to see this developed. It would be great if we could only allow selectable dates between 5 and 20 weeks from todays date.

    Posted 12 years ago on Monday January 30, 2012 | Permalink