Hi, I set exposed filter on views with operator from arrival to departure, the problem is when search for available date by select arrival and departure date, it doesn't give any message whether selected date is available or not. Any help would be much appreciated.

Comments

yalasta created an issue. See original summary.

fietserwin’s picture

Can you please elaborate with an example? What you did, what you expect, what you get instead? Screen dumps are also fine.

yalasta’s picture

Sorry for confusing
- I create 1 content type called "calendar" and add Availability Calendar and Availability Calendar Booking formlet field
- add 1 (only 1) calander content
- add 1 views page called "availability calendar" with field (content:calendar).
- on filter criteria, add calendar available and expose with operator: From arrival to departure and set exposed form in block and add it to a block region, so I have this filter option that user can select in arrival date (date popup) and departure date and hit search.
What I expect is, when user click on search, it will check whether the selected date is available or not by giving user a result like: "the date is available" or "the date is fully booked" if we set certain date to be fully booked.

fietserwin’s picture

It is a filter, not a check, thus reducing the list of results to only those entities that also match this cirterium. A filter (in a View) is converted into a(n additional) where clause

select *
from node
where type = 'calendar'
and is_available between start_date and end_date

So If you have only 1 node of type calendar, you will either see that node if it is available or no node at all.

yalasta’s picture

I got it, thanks for explanation :)

fietserwin’s picture

Status: Active » Closed (works as designed)