Forums

The Events Calendar
[resolved] Datepicker not working (3 posts)

  1. smallwebsolutions
    Member
    Posted 10 months ago #

    The dropdown datepicker is throwing a not found error. I am not sure if this is a 3.2 issue or not, because I did not install this plugin until after the 3.2 release, but I know the datepicker is a jQuery function, so it might be.

    You can view the error here:

    Calendar page:
    http://hammondmarina.com/wp/category/events?eventDisplay=month

    Sample error for datepicker choice of August, 2011:
    http://hammondmarina.com/wp/category/events&eventDisplay=month&eventDate=2011-08

    The forward and backward links are working fine. I discovered that when you substitute the "&" with a "?" after category/events, the link will work:
    http://hammondmarina.com/wp/category/events?eventDisplay=month&eventDate=2011-08

    How do I fix this in the the-events-calendar/views/datapicker.php file?

    Great plugin, BTW. I am highly recommending to my client that they make a contribution.

    Thanks in advance for your help.

  2. smallwebsolutions
    Member
    Posted 10 months ago #

    Discovered this was a permalink issue. I had pretty permalinks deselected on the plugin options because my original permalink structure was not working correctly with the calendar. Turned pretty permalinks back on and changed my permalink structure and all is well.

  3. topquarky
    Member
    Posted 10 months ago #

    I'm unable to use the Pretty Permalinks on my site for some reason. With Pretty Permalinks turned off, I experience the same problem as @smallwebsolutions.

    The problem is in the file the-events-calendar/views/datepicker.php.

    If you replace this:

    if( '' == get_option('permalink_structure') || 'off' == eventsGetOptionValue('useRewriteRules','on') ) {
    	$link .= '&eventDisplay=month&eventDate=';
    }

    With this:

    if( '' == get_option('permalink_structure') || 'off' == eventsGetOptionValue('useRewriteRules','on') ) {
    	// TopQuarky - updated just in case $link doesn't have a '?'
    	$sep = (strpos($link,'?') !== false) ? '&' : '?';
    	$link .= $sep.'eventDisplay=month&eventDate=';
    }

    The datepicker now works without Pretty Permalinks.

Reply

You must log in to post.

About this Plugin

About this Topic