Hi all,
This issue was bugging me a lot. I think I had some loop issues somehow competing with the datepicker, causing it to not work at all. The dropdowns worked fine, but when they were selected, nothing happened. There were javascript errors.
For my purposes, I didn’t really need the ajax form so I created a simple javascript function to process the form and bypass the old datepicker form. Simple stuff, but maybe it will help someone having the same issue I was with the datepicker not working. Simply replace the code in datepicker.php with the following:
<?php
$cat_id = get_query_var( 'cat' );
if( !$cat_id ) {
$cat_id = $spEvents->eventCategory();
}
$link = get_category_link( $cat_id );
if( '' == get_option('permalink_structure') || 'off' == eventsGetOptionValue('useRewriteRules','on') ) {
$link .= '&eventDisplay=month&eventDate=';
}
?>
<script type="text/javascript" charset="utf-8">
function combineFields() {
document.datePickForm.eventDate.value = document.datePickForm.EventJumpToYear.value+"-"+document.datePickForm.EventJumpToMonth.value;
return true;
}
</script>
<form method="post" action="#" name="datePickForm" onSubmit="combineFields();">
<select id='events-month' name='EventJumpToMonth' class='events-dropdown'>
<?php echo $monthOptions; ?>
</select>
<select id='events-year' name='EventJumpToYear' class='events-dropdown'>
<?php echo $yearOptions; ?>
</select>
<input type="hidden" name='eventDate' value='None'>
<input type="submit" name="submit" value="Go!">
</form>
and it will work, provided your permalinks are set up right.