I have used CCK to create an Event content type. I added a date field to this type to show the start date of the event. When I try to create a calendar with this date field as the argument, I get the following error: The calendar_style style requires a Date argument.

I am using the most up to date modules of CCK, Calendar and Date.

Can anyone help me please!

Comments

RobLoach’s picture

Version: 6.x-2.0-rc6 » 6.x-2.1

Yup, adding the Date: Date field results in some error and you can't save the page.

stinky’s picture

So, what's the answer to getting rid of this error msg?

groovedork’s picture

I have the same problem. This seems like a very basic thing one would want to do? Am I taking a strange route?

new content type -> add CCK date -> create view -> add "node-title" and "content-startDate" as fields-> choose 'calendar' as style -> error.

arlinsandbulte’s picture

For the calendar to work properly, you MUST either modify or clone the default calendar view that the calendar module supplies.
You cannot create a new view and configure it to be a calendar view (something about some things that are done behind the scenes)
Could that be your problem?

arlinsandbulte’s picture

Status: Active » Fixed

No response after 1 month... marking as fixed.

Status: Fixed » Closed (fixed)

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

yan’s picture

Version: 6.x-2.1 » 6.x-2.2

Strange thing, I had the same problem. I wanted to change the date argument from "Node: Updated" date to "Date: Date (node) Content: Date (field_date)". When I did so and deleted the "Updated" argument, I got the error message. I, then, added the "Updated" field again and the message went away. Then I had to add the same field_date argument again (with the same settings) and delete the first one. Now it works.

It seemed that somehow the date field wasn't recognized as such in the first place.

mahnster’s picture

I finally figured this thing out when looking at the code...but don't like how this was done. You see, there is a variable in the code for the 'calendar' module called 'date_argument'. It is a Views object. When you install calendar, this date_argument variable is set to this 'Node: Update date' argument. The code always looks to make sure that this date_argument variable is set. If you add a new date, like a field_date from CCK, WITHOUT deleting the Node: Update date first, the new argument has no name (but for this sake, say it was called 'date_argument2'). Then you delete the original date argument, well, date_argument is no longer set, and it doesn't know that date_argument2 is a date argument. I think you have to have everything deleted before it can figure out that the new date variable is a date_argument. That sucks. I wish, when it finds in the calendar module code that it no longer has a 'date_argument' that it would search the other arguments and see if they are a date, and then set date_argument to that?

j. ayen green’s picture

Confirmed.
1. Delete Updated date argument in default display
2. Delete Updated date field in default display
3. Add new date field in Arguments (if you created a CCK field in a node, choose node date, then when the config settings appear, one of the check boxes that identify which field to use will be that field). In the section for Action if no argument is present, select Provide default value, and then select Current date
4. Add new date field in Fields

d------’s picture

Status: Closed (fixed) » Needs work

Update please to "needs work" - the issue still exists: "The calendar_style style requires a Date argument."

WaZaa123’s picture

I had the same problem and when I changed date argument all my events disappear but I think I find a explaination for this issue. So I post my solution here.

To fix this, when you are adding a "Date" CCK field in your content type, you have to choose "timestamp"date format otherwise you don't have any events in your calendar.

Hope helps somebody!

(Sorry for my bad english)

Neslee Canil Pinto’s picture

Issue summary: View changes
Status: Needs work » 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.