I'm not sure whether this is a bug report, or a feature request, or something else.

Starting on the main page of my drupal site, I navigate within the calendar block to the next month, then click on a date that has events. This takes me to the calendar page, with the selected day being displayed.
At the same time, the calendar block (in the sidebar) switches back to the current month.
Is that really intended ? Can it be made to preserve its state, i.e. keep displaying the month from which I just selected the date ?

(I have enabled and re-disabled AJAX for the block, this doesn't appear to make a difference.)

Thanks,
Stefan

Comments

KarenS’s picture

Category: bug » feature

Hmm, I never thought about this, but it would not be hard to do. We just have to add the '&mini=....' stuff to the day url.

stefan_seefeld’s picture

I'm not sure whether this is of any help, but the Event module(s) I used before upgrading to drupal 6 provided the functionality I'm looking for.

Right now I have site users complain because the calendar navigation is quite inconvenient, since the calendar (block) resets itself to 'now' each time you click on a date.

Thanks,
Stefan

stefan_seefeld’s picture

Ping ?
Any chance you could look into this ? I know lots of people who would very much appreciate that.

Thanks,

stefan_seefeld’s picture

ping again ?

stefan_seefeld’s picture

Version: 6.x-2.0-rc1 » 6.x-2.2
Category: feature » bug

To add a little urgency to this, let me turn it into a bug report:

Steps to reproduce:

* move away from the current month in the mini-calendar view by either clicking the '<<' (prev) or '>>' (next) link.

* Now the month is showing a month other than the current. However, the associated URL will not be that of the written month, but the current month. In my case, I'm moving to 'November' (now being August). Clicking on the 'November' link opens a month view...for August.

I'd love to see this fixed (together with the requested feature, ideally ;-) )

Thanks,

manooweb’s picture

Hello

is there any simple solution about the month's link in mini calendar title which always go to current month's calendar page?

Calendar 6.x-2.2 and Date 6.x-2.3
I have the same issue with "-dev" modules.

Thanks
manoo

arlinsandbulte’s picture

Category: bug » feature

I am changing this back to a feature request for the original reasons.
I agree and would welcome this feature...

The bug mentioned in #5 is a duplicate of #408190: Mini Calendar Block Title Link is wrong after next/prev months link are followed.
There is some code there that works to fix the bug mentioned here, but no patch yet.

hermes_costell’s picture

Issue tags: +calendar navigation, +Calendar Block View, +views php arguments, +calendar month

If this is a "feature request" then I'd say it's a pretty critical one, because what's being asked for is standard UX behavior.

Usage scenario: You scroll 3 months into the future on the mini-cal, see lots of events in the month, and click on one of them. Then you want to look at some more ... but realize that you're going to need to scroll 3 months into the future EACH TIME you want to look at the events in that month, because the mini-calendar on the side has reverted back to the first month again. Needless to say - you leave the site.

How I solved this for a site I'm working on - overview:

  • Patch the calendar code - because as of this writing it's broken and you can't proceed with the next steps otherwise
  • Modify the calendar block view
  • Set an argument
  • Provide default argument -> Default argument type -> PHP Code

Details:
Note: I'm using calendar 6.x-2.4
Patch the calendar code using info from this page: http://drupal.org/node/450082 which will direct you to use this patch:http://drupal.org/files/issues/default_or_php_arg2.patch
In the PHP Code block in views:

Note: in my case I'm using granularity of "month", and the URL structure for the calendar section of this particular site is: http://www.SITE_NAME/events/day/YYYY-MM-DD. You will have to modify the code below for your use-case.

//attempt to get the date from the URL
$display_timestamp = FALSE;

if( arg(0) == "events"){
  if( arg(1) == "day"){
    if( ( trim(arg(2)) != "" ) ){
      $display_timestamp = strtotime( arg(2) );
    }
  }
}

if(!$display_timestamp){
  $display_timestamp = time();
}

return date("Y-m", $display_timestamp);

In my case the code isn't yet complete. I actually will beef it up shortly to add more checks in the arg(1) level - checking for "month" and "week" and calculating the correct $display_timestamp based on those values. Anyways I wanted to put forth the code above to help out anyone else who might be in a similar situation. I also found the documentation on how to return a views argument from the PHP Code pretty pathetic, so I'm hoping this helps others out there as well.

Neslee Canil Pinto’s picture

Issue summary: View changes
Status: Active » Closed (outdated)

The D6 branch is no longer supported so we're closing this issue. If you think this issue still exists in D7 you can open a new one.