in my drupal (4.7) i set up a view of nodes filtered by node type and by start month (greater or equal to now).
view type is calendar and arguments are calendar year, month and day ("display all values").

nodes are filtered correctly in the page i created. problem is that current year calendar is displayed and i can see a month calendar only clicking on 'month'. how can i have current month calendar displayed by default?

am i supposed to overwrite some php function on my template?

thank you!

Comments

KarenS’s picture

Title: how to display current month? » Default to current month view
Category: support » feature

I started to write that you just need to create a link to the month calendar and send people to that when I realized the problem. The current month is a moving target so how could you write a link? So what is needed is to have the default view always be the month view instead of the year view. That seems like it would be a good idea and the behavior you would expect, but I will need to think a bit about how to make it behave that way, so I'm making this a feature request while I mull it over...

chrissearle’s picture

Just tracking this one - got the same wish on 5.0 :)

victortrac’s picture

Just subsribing to the issue. :)

KarenS’s picture

Status: Active » Fixed

Fixed in all branches in latest commits.

chrissearle’s picture

Hate to sound daft - but - how do you set it up? What changed?

KarenS’s picture

There is nothing to set up. Now when you go to the url without any arguments (i.e. drupal/calendar) it will display the current month. Previously it would display the whole year. Once there, you can get to the year, week, or day view using the links at the top of the page.

vthirteen’s picture

Status: Fixed » Active

thank you KarenS!
just a question: will you add the commit to the module downloadable file or are we supposed to patch the existing one with code available at http://drupal.org/cvs?file=/modules/calendar/calendar.module ?

KarenS’s picture

It's in the nightly snapshot versions (see the link to 'other releases' on the project page). When I feel like I have the latest changes all stabilized, I'll create a new 'official' release.

sym’s picture

I hate to say this, but I'd really like the year view as default, rather then month.

Should this be an option on the view edit page?

KarenS’s picture

Status: Active » Fixed

Actually, the year view is a real system hog, so defaulting to the month view is going to be a better default in most cases. If you feel strongly about adding an option to default to the year go ahead and make that a separate feature request, but I am definitely leave the 'normal' default behavior to be the month view because of the system resources required to generate the year view.

Anonymous’s picture

Status: Fixed » Closed (fixed)