I'm attempting to create a calendar view showing nodes that have a datetime field. To do so I'm taking the existing view, and deleting the node update argument & field. Unfortunately after I add the event_date field for my node to both the view arguments and view fields I receive an error that the "calendar_nav style requires a Date argument"

I've tried everything from reverting the view, to adding the fields in different orders, but the results always remain the same.

Comments

duco’s picture

I've the same problem but with the German Error-Message: "calendar_nav erfordert ein Datumsargument."

zabelc’s picture

@duco, you're in luck: I just figured out how to avoid this error.

When you add a data argument, DON'T look for your date field. Instead, use the Groups dropdown to select "Date". Here you will be given two options "Date: Date (node)" and "Date: Date (users)". Select "Date: Date (node)", and click "add". You will then be given an option to select the appropriate Date Field as a check box.

You can put whatever Fields you want.

zabelc’s picture

Status: Active » Closed (works as designed)
Patricia_W’s picture

Version: 7.x-1.0-alpha3 » 6.x-2.4

I am having the same problem and I have followed your instructions ... added the date field via the Date option. I still get these messages:
* The calendar_nav style requires a Date argument.
* The date argument date fields must be added to this query. You can exclude them if you do not want them displayed in the calendar.
* The date argument date fields must be added to this query. You can exclude them if you do not want them displayed in the calendar.
* The date argument date fields must be added to this query. You can exclude them if you do not want them displayed in the calendar.
* The date argument date fields must be added to this query. You can exclude them if you do not want them displayed in the calendar.
* The date argument date fields must be added to this query. You can exclude them if you do not want them displayed in the calendar.
In my case I am using calendar 6.x-2.4 and views 6.x-3.0

When I attempt to edit the date argument I get the following message:
warning: Invalid argument supplied for foreach() in /home/content/p/w/a/pwarwick/html/includes/form.inc on line 1213 which has something to do with checkboxes.

UPDATE: These errors have gone away when I reverted to views 6.2
However, I cannot figure out how to get the monthly calendar block view to highlight the date which has the event.

Another Update: I discovered how to get the calendar block to have a link to the event by attaching the day view to the calendar page. However clicking on this link in the block brings up the page view which I really do not want. I would prefer to link to the Month view by default ... but removing the page view breaks the link. Is there anyway to make the link go to the Month view?

Conclusion? I noticed that if one clicks on the header of the mini-cal it goes to the month view. Clicking on the day itself goes to the day view. Makes sense in hindsight.

oregonwebsiteservices’s picture

Wow - thanks for the solution zablec!

It was working for me till I updated to a new version of views 7.x-3.x-dev - I was finally getting the hang of setting up my Drupal 7 calendar but after I updated my date_field is no longer available - I tried to go back to 7.x-3.0-beta3 but I still have the problem

This is what I am doing:
add Contextual Filter ->
select Date: Date (node) - (not Content: Date (field_date) - value)
then Configure contextual filter: Date: Date (node)
But I am no longer given an option to select Date (field_date) ??

dernetzjaeger’s picture

I have the same problems after updating views.
The developer of carlendar notes that it might only work with the latest dev - versions of views, ctools and date. I will try that and give a feedback if all works well.

berenddeboer’s picture

I'm on the latest greatest, and can confirm it will indeed work.

oregonwebsiteservices’s picture

Yep - my problem went away with the latest

Steve Bizuns’s picture

I think i found a solution to the issue reported here in 2.4. I have set calendars up many times but today for some reason I had this error after changing to my cck date. *note* The cck date field I had added to the view contained 'From' and 'To' dates (same as I have always done).

Solution that worked for me:
While troubleshooting I tried switching the field to "show From date only", this fixed my problem. Oddly enough I change it back to "show both from and to dates" and it still works without any error.

Using: cck-6.x-2.9
views-6.x-2.12
calendar-6.x-2.4

Bizuns.com

CraigBertrand’s picture

Number 2 worked for me

giucas’s picture

Number 2 worked for me too

bixgomez’s picture

@zabelc, you saved me! I am so pleased that you posted the solution at #2! Thanks...