I've got a view block using the calendar and showing upcoming events.

All the events in the calendar have a date greater than now() so I always have the calendar, in month view, starting with this month. This is what I would expect given that this is just in effect showing a date sorted list of nodes.

I'm getting complaints from the users that when they click on a given event, not in the current month, the mini calendar still shows the current month, which is not the month that the event being viewed is in.

SO, it's September now, so my mini calendar shows September. If I click on an event in November, I want the mini calendar, in a block on the page, to show November.

I'm guessing the answer is in contextual filters, but I've been unable to work out how to get this to work. Any help much appreciated.



darksnow’s picture

Perhaps this is more of a general views problem. It's my understanding that views generates the same query and this module just displays the results are a table in calendar format.

That's exactly what's needed here but I think being able to associate the month displayed in the rendered calendar with the current node would be a common use case when this is in a block.

Any ideas?

AdamGerthel’s picture

Project: Calendar » Date
Version: 7.x-3.4 » 8.x-1.x-dev
Component: Documentation » Views Argument
Category: Support request » Feature request
Issue summary: View changes

I've been trying to do the exact same thing. Date offers contextual filters, but the only values accessible are node created, edited etc. Would be very useful to be able to get the value of a date based on the node being viewed.

krem’s picture

I managed to do it following this method and overwritting the mini calendar link

Basically you pass the date as an argument so it can be used by the contextual filter.

I hope it helps ;)