简体   繁体   中英

Views Date Filter - granularity

I'm having an issue with views date fields. I'm currently filtering a date with minute granularity. This filter is an exposed filter but only shows year, month and day.

I checked in the markup and there's nothing hidden. In fact, when I try to set a default value for the filter it's not showing hour and minute neither.

Then I tried with different date fields from other content types and this issue is still present: granulity works only for day, month and year.

The query shows minute granularity, so I think that my last approach could be altering the query with the values in GET or POST.

So, I want to know if any of you have experienced similar problems, or if anyone can give me some hint of what could be happening.

Thanks!

PD: Most modules seems up to date. Views and Date are updated too. PD: Date views is enabled.

I was having the same problem and after hours I finally found my mistake. In my case I hadn't selected the filter value as "Date" when adding the filter. I corrected the problem by Add filter, set filter to "Date" (right next to search box) and selected "Date: Date (node)". Then set "Date selection form element" and "Granuality" and in the date fields the desired field you are going to use for filtering. I think this way you 'll solve the problem. In my case it worked. The problem was that i added "Content: Post date" in the exposed filter. Hope it helps

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM