Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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
Comment #1
RobLoachYup, adding the Date: Date field results in some error and you can't save the page.
Comment #2
stinky CreditAttribution: stinky commentedSo, what's the answer to getting rid of this error msg?
Comment #3
groovedork CreditAttribution: groovedork commentedI 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.
Comment #4
arlinsandbulte CreditAttribution: arlinsandbulte commentedFor 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?
Comment #5
arlinsandbulte CreditAttribution: arlinsandbulte commentedNo response after 1 month... marking as fixed.
Comment #7
yan CreditAttribution: yan commentedStrange 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.
Comment #8
mahnster CreditAttribution: mahnster commentedI 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?
Comment #9
j. ayen green CreditAttribution: j. ayen green commentedConfirmed.
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
Comment #10
d------ CreditAttribution: d------ commentedUpdate please to "needs work" - the issue still exists: "The calendar_style style requires a Date argument."
Comment #11
WaZaa123 CreditAttribution: WaZaa123 commentedI 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)
Comment #12
Neslee Canil PintoThe 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.