First noticed on Calendar Month view, the Prev and Next pager links stay on the same month. The issue was in /sites/all/modules/date/date_views/includes/date_views_plugin_pager.inc Lines 283 and 285 in query() function where date_modify() uses $granularity variable which is not defined, so $this->options['granularity'] should be used instead.
Additionally date_modify() skips a full month due to this PHP issue: http://stackoverflow.com/questions/3602405/php-datetimemodify-adding-and...
So for a quick fix, as it is not critical for pager links on month view, the following works for me:
L283:date_modify($this->view->date_info->prev_date, '-1 ' . $this->options['granularity']);
L285:date_modify($this->view->date_info->next_date, '+1 ' . $this->options['granularity'] . ($this->options['granularity'] == 'month'?'-3 days':''));
If someone willing to review the validity of it and possibly pack it into a patch that'd be great, I'm not yet familiar with Drupal Issue queue.
Comments
Comment #1
math-hew commentedI was having the same issue. Tested your code and it worked fine for me. Thanks!
Comment #2
webengr commentedconfirm, I had the same issue using the dev 7 dated 2015-Mar-06
the server had php 5.4.38
I modified lines 283 & 285 and that is working for the calendar tabs
Comment #3
jlea9378 commentedI was having this same problem on 7.x-2.9-rc1 and this fix solved the problem for me.
Comment #4
andrew@oscailte.org commentedFor version 7.x-2.9-rc1, the code (lines 283 - 285) looks like this:
I changed just line 285 to be:
Comment #5
jody lynnSee also #2375235: Calendar block Next/Prev navigation broken
Comment #6
Lostboy22 commentedSee fix for -dev https://www.drupal.org/node/2375235
taging to -dev issue
Comment #7
andrew@oscailte.org commentedI still need the fix in my comment #4 above for version 7.x-2.9
Comment #8
SeanA commentedYet another duplicate of #1874422: Pager may cause incorrect "prev" or "next" link.