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.

Display the Calendar in the opened state

  1. Hello,

    How can I have the date picker to show the calendar in the opened state when the page is loaded?

    Posted 11 years ago on Tuesday February 19, 2013 | Permalink
  2. It looks like you can use the show() function:
    http://api.jqueryui.com/datepicker/

    I added a datepicker to the page and then added this code to my theme's functions.php to include a small bit of jQuery to force the datepicker to shown when the page is loaded: http://pastebin.com/s6rDnwJ2

    There are simpler ways to add the jQuery to the page, but above is how I did it. This is the code which forces the datepicker open:

    [js]
    jQuery(document).ready(function($) {
    	$( "body .gform_wrapper input.datepicker" ).datepicker( "show" );
    });

    If you added it to the header of your page, it would look like this:

    [js]
    <script type="text/javascript">
    jQuery(document).ready(function($) {
    	$( "body .gform_wrapper input.datepicker" ).datepicker( "show" );
    });
    </script>
    Posted 11 years ago on Saturday February 23, 2013 | Permalink