I've been trying to find a way to do this, but nothing seems to work...

Is it possible to get a specific 'view' of fullcalendar by specifying an argument to the url?

EG. Can you force the calendar to display a week view for a specified week? or A day view for a specific date?

I can force the month view via /fullcalendar?year=2011&month=09&day=01

But how do you get week or day?

Thanks

Comments

aspilicious’s picture

You can't :)

tim.plunkett’s picture

Category: support » feature
Status: Active » Needs review
StatusFileSize
new598 bytes

This should do it. Untested.

/fullcalendar?year=2011&month=09&day=01&mode=agendaDay

All options are here: http://arshaw.com/fullcalendar/docs/views/Available_Views/

aspilicious’s picture

Nice! Should work indeed, didn't knew you could do that with fullcalendar. I thought it always used the first view of an array. But you can choose one. Nice :)

gmak’s picture

That works! And a really fast response. tim.plunkett Rocks!

Now, how about this one?

Thanks.

tim.plunkett’s picture

Version: 7.x-2.x-dev » 6.x-2.x-dev
Status: Needs review » Patch (to be ported)
tim.plunkett’s picture

Status: Patch (to be ported) » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

askibinski’s picture

Version: 6.x-2.x-dev » 7.x-2.x-dev
Category: feature » bug
Status: Closed (fixed) » Needs review
StatusFileSize
new814 bytes

Currently, this does not work at day-level. It works at month and week level but not at day level, because the parameter needed to be 'date' and not 'day'. See http://arshaw.com/fullcalendar/docs/current_date

Here is a patch to fix this!

aspilicious’s picture

I don't think we should add "date" in the url. But we can fix the bug

In stead of

+  if (isset($date) && is_numeric($date) && $date > 0 && $date <= 31) {
+    $settings['date']['date'] = $date;
   }

We can do

  if (isset($day) && is_numeric($day) && $day > 0 && $day <= 31) {
    $settings['date']['date'] = $day;
   }
askibinski’s picture

StatusFileSize
new665 bytes

Thanks for the fast reply. Yes, you're right, that would keep it backwards compatible.
Here's a new patch.

redndahead’s picture

Status: Needs review » Fixed

This patch is incorporated into the patch in this issue #1279588: Load additional events when using ajax
Putting it back to fixed.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.