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.

Date picker dropdown conditional statement

  1. I have a cupcake shop that has a unique ordering method. Basically when someone selects when they want to pick up an order from the date picker the next conditional box needs to be a dropdown that has times for pick up. The thing is pick up times are different based on the date chosen, so if saturday is picked the hours would be 9-6 whereas Monday-Friday it would be 8-9pm. Any help would be great especially if I could use the date picker to choose the date and then the times reflect available pick ups for that day.

    Also is there a way to add dates to the picker that are not available for pick up like when we are closed for holidays or routine maintenance or cleaning/inventory?

    Thanks, Jonathan

    Posted 12 years ago on Wednesday September 5, 2012 | Permalink
  2. You can restrict the dates which are available in the datepicker. The datepicker we use is the standard jQuery UI datepicker. Here is one example of how to disable a list of dates.

    http://articles.tutorboy.com/2010/09/03/jquery-ui-datepicker-disable-specified-dates/

    The conditional logic which is built in to Gravity Forms does not support a date condition. I think you will have to add some jQuery on the front end of your site to modify the hours available based on the day and date. Unfortunately, this is a customization which goes beyond the support we can give in these forums. There is nothing built in to Gravity Forms which can handle this for you. You'll have to add some JavaScript or jQuery to handle this for you.

    Posted 12 years ago on Thursday September 6, 2012 | Permalink