just tried adding a view for searching on availability by these steps:
- created a view, with exposed filter availability
- expose filter to visitor (name arrival)
- created a temporory page for testing
- changed one of the content items, set availability september month to fully booked
- on opening the page there is an input box for the arrival
comments and/or questions
- a date picker would be great (feature request)
- tried several date formats but none seems to work, the fully booked in september item still shows (dates used 15 september 2011, 15/9/2011, 15-9-2011). what to put in the input box?
- to have all my items show up in the available list, i need to open and save them first (seems the availability calendar is not "automatically" added to already existing content items)
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | myscreenshot.png | 64.6 KB | ronajon |
Comments
Comment #1
fietserwinThank you for your suggestions, though I get the idea that some text is missing in the part describing your troubles.... Working on the UI for search was already on the todo list and will be done before releasing the official version.
- Date picker: will probably be done via a (soft) dependency on the date module. Not installed = no date picker.
- Fields are indeed not created: this is the standard behaviour for fields: adding a field to a bundle that has already content will not create fields for this content (they are considered empty).
- The date format can be any format accepted by strtotime(), so that shouldn't be the problem: To be sure, use yyyy-mm-dd, the ISO8601 standard, to stay clear of month versus day confusion.
- Note: I'm still working on how the entered dates should be used: I think arrival date should be inclusive and departure date not inclusive, which is as currently documented but not not as it currently is working (both inclusive)... If you think differently, let me know, including your use case.
Comment #2
ronajon commentedfirst part of my text was to show the steps i have taken to add the search fields to a page. Don't know what text should be missing?
tried the exposed filter with at date and with between dates, but still when trying 2011-09-16 (september is fully booked for one item) the item still shows. Also on between dates all items are show, including the september blocked item
Comment #3
fietserwinCan you click on the dates that are booked? (you also have to check interactive for that on the field display settings, but I guess you have, as you are integrating it with the booking formlet). If you can click on the dates that are booked, that state is considered available. You can define this on the settings page: admin/config/content/availability-calendar/settings. I have had one mentioning of this before, but the install procedure seems to properly populate the starter set of states including their is-available.
Did you define a default state for the field?
If it still does not work, can you post the query as generated by Views (you can view the query while editing the view)?
Comment #4
ronajon commentedthe dates are still clickable, even after setting them to fully booked. CSS style for those dates is
<td class="cal-na cal-selectable"><div>20</div></td>how to check interactive? i can't seem to find it, is it in availability module or booking module?
attached a screenshot of the field settings
Comment #5
fietserwinThe "interactive" setting can be found on the display settings of an availability calendar field, but as there is a class cal-selectable, that setting is checked. So the problem must be in the definition of what states are to be considered available: please visit the admin/config/content/availability-calendar/settings to correct this. It looks like that the state "fully booked" is considered available where it of course should not be.
Hope this helps, please let me know the results.
Comment #6
ronajon commentedi now see the meaning of the "is available" column in the settings of the states. Thought is was for enabling / disabling the different states ...
thanks for the help
Comment #7
ronajon commentedComment #8
fietserwinRephrased the label a bit. Writing more help is on the todo list, but should probably not be done by me to avoid issues like this.