Closed (fixed)
Project:
Date
Version:
6.x-2.4
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
4 Sep 2009 at 07:27 UTC
Updated:
20 Nov 2010 at 23:52 UTC
Hi!
I created a datetime field with CCK, a textfield with a pop-up calender.
The problem is, with views, i cant Filter on this field. When i click on Add filter, the field is not showing. However, when i click on Add sort criteria, the datetime field IS showing.
What am i doing wrong? =)
Comments
Comment #1
darthf1 commentedComment #2
superbaloo commentedMaybe you have to write a plugin for views, use the views API to create a new filter :)
Inherit it from views_handler_filter
Check http://views-help.doc.logrus.com/ for this :)
Comment #3
superbaloo commentedBTW, it's more a code related issue than user interface
Comment #4
dawehnerAs alternative you could do something with hook_views_pre_query. But thats not as easy as it seems :)
Comment #5
darthf1 commentedok thnx, ill look into the code thing.
Isnt there a simple explanation why this field is showing up in sort criteria, but not in the filter?
Comment #6
merlinofchaos commentedPlease read the submission guidelines before posting.
Comment #7
skybow commentedI just had the same problem as you described. I could not figure out how to add the damn date field to the filter.
I looked on how I did it in another project, and it works there. I looked, and looked, and looked... (it's getting late here)
And finally I realized that I wasn't seeing the wood for the trees:
You have to add a "Date (node)" filter. After adding, you'll be able to select your date field. Date fields don't show up in the "Content" section. It's a bit confusing, I guess.
HTH
Comment #8
darthf1 commentedWow! Thats exactly the feedback i needed.
Many thanks!
Comment #9
darthf1 commentedComment #10
str1 commentedThank you skybow, had the same issue
Comment #11
aauger@diocese-sacramento.org commentedThank you, it worked great.
Comment #12
achaux commentedThank you skybow, I was stuck on this for quite a while.
Comment #13
Rizhaya commentedOh! Thank you, skybow! It was a kind of nightmare to me =))
Comment #14
ChiliConSql commentedAwesome! Thank you skybow.