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.

Default date 90 days in future?

  1. btickler
    Member

    Making good progress but ran into a date issue...

    I need to set a date for 90 days in the future by default...is there any way to do this on the form without tinkering with Jquery and passing in a parameter? If not, how do I go about doing that? I don't see where I can add the JS script (I don't want this code snippet to run on every page using the same template...), and I don't know how to pass the parameter.

    Posted 12 years ago on Sunday June 19, 2011 | Permalink
  2. Yes, you can customize the jQuery datepicker to default to certain dates, exclude weekends, show ranges, etc. by manually adding some script to your theme/page template.

    The datepicker component is straight from the jQuery UI library so you can refer to their documentation for how-to's.

    http://docs.jquery.com/UI/Datepicker

    Also, here's a link to another thread that discussed something similar.

    http://forum.gravityhelp.com/topic/how-to-highlight-current-date-or-future-date-in-jquery-datepicker#post-5606

    We do plan on adding some of these options to the UI in the future but for now you'll have to use some jQuery in your theme header file to set the date picker options.

    Posted 12 years ago on Sunday June 19, 2011 | Permalink
  3. btickler
    Member

    Ok, thanks. I did read those couple of threads about it, that's why I knew I might need JQuery :).

    I will ponder the idea. There's only one date field I need to default on the entire site (www.dlantern.com) so I am not sure I want to add the script overhead to the default page template just for that. I'm already running about 20 plug-ins (maybe a dozen of which actually should have an impact on page load times, but you never know ;)...), and my page loads are a few seconds each even without any traffic whatsoever, so I'm trying to find ways to cut the load times and minimize anything else I add.

    Posted 12 years ago on Sunday June 19, 2011 | Permalink