fietserwin’s picture

Status: Active » Closed (works as designed)

Date display is now configurable and localizable. See the readme for more details. You can configure your date settings at admin/config/regional/date-time(/locale). Apparently your settings use the format letters n and j twice, while they should be used only once. also no time format characters should be used.

Did you enter this format yourself? Because I cannot see any error in the defaults in the module's code, I have no idea where these are coming from. So closing as "works as designed". However, please do reopen if you think there is an error in the module or the defaults the module does provide. Perhaps a clear cache removes the problem?

danielm’s picture

Thank you for your quick response.
I use:
Drupal core 7.14
Availability Calendars 7.x-3.2+21-dev (2012-jui-09)
Date 7.x-2.5
Views 7.x-3.3

I try the following patch but it does not work : "With Views integration you might run into this date popup issue: #1342874: Allow date popup in exposed Views form to 'remember' value."

I did some tests:

I disabled date popup module
doubled dates have disappeared

but I have the following error message:

An AJAX HTTP error occurred.
HTTP Result Code: 200
Debugging information follows.
Path: /en/admin/structure/views/view/availability_search/preview/page/ajax
StatusText: OK
ResponseText: Fatal error: Call to undefined method availability_calendar_handler_filter_availability::op_from_duration() in /drupal-7.14.2-dev/sites/all/modules/availability_calendars/ on line 364

Thanks in advance

fietserwin’s picture

Status: Closed (works as designed) » Fixed

Thanks for reporting your details. You hit 2 cases I did not test and even worse, I missed your referral to date popup in the title:(.

- The date format passed to date popup was converted to the javascript date picker format, but that should be done by the date_popup module.
- Missed an occurrence during a function renaming.

Fixed and committed both errors.

danielm’s picture

9.91 KB

I tested version committed but asked the hours and minutes for the arrival and departure
see attached file.

I have no result when I did a search (block and page with views)
you can give a model to configure block and page in views please.


fietserwin’s picture

What are your settings for the "Availability Calendar date display" and "Availability Calendar date entry" date formats? Please look at both admin/config/regional/date-time and admin/config/regional/date-time/locale.

You can also look with a debugger by setting a breakpoint at line 229 of and see what value gets assigned to the #date_format.

    $element['#date_format'] = variable_get('date_format_availability_calendar_date_entry', '');

The time part is not showing up at my site, also not after I enabled all modules of the date package.

danielm’s picture

I changed the format and it works.

Do you want I to create a new issue for my problem with views?
Thank you again

fietserwin’s picture

Can you check what states are marked as "being available" in admin/config/content/availability-calendar?

danielm’s picture

Yes, for Available(cal-av), Fully booked(cal-na) and Provisionally booked(cal-opt)

danielm’s picture

see attached file.

fietserwin’s picture

You mean the checkbox "treat as available" is checked for those states? That is not logical.

Are you sure you already have some calendars with some availability defined?

If so, please post the query that gets executed by views. Normally that is shown in the preview at the footer of your edit view page.

fietserwin’s picture


So all availability is defined as being available, this is weird, but for testing this problem it should be OK.

Your view:
- sorting on published is strange: normally you filter on published instead of sorting on it.
- not filtering on content type is strange: you should filter on the content type(s) that has(/have) the calendar field you are searching on. I'm not sure about what happens when you do not filter on that.
- if your site is multilingual, you normally also filter on language.

danielm’s picture

Can you tell me what is not logical? I do not understand.
see attached file

fietserwin’s picture

I sense some miscommunication, so back to start.

- What exactly is your current remaining problem? What is it exactly, that is not working.
- Do you understand that to search on availability, the module needs to know which state indicates that a day is "available" and which state indicates that a day is "no longer available"? So if you check "fully Booked" as being "available" a search will return objects that have days in the defined period set to "fully booked".

danielm’s picture

Hi, after many test I found the problem.

1 ° test on my dev website multilingual:
- Version 3.x-7.x-dev search displays anything (does not show what should be posted and displayed what should not be displayed).
- Version 7.x-3.2 search everything is displayed correctly (not very nice translation and display dates)

2 ° test on a freshly installed site (with only the modules date ctools and views):
- version 3.x-7.x-dev search does not display the boxes date.
- version 7.x-3.2 search everything is displayed correctly.

- version 3.x-7.x-dev search does not work.
- version 7.x-3.2 search works fine but not very nice (translation site multilingual and display dates).

see attached files

fietserwin’s picture

Thanks for your effort in testing this dev version. due to the large amount of (subtle) changes it is a real dev version.

I found, fixed and committed an error in handling dates from the date popup (they were already passed in ISO format instead of the display format).
Date popup not displaying cannot be reproduced by me. Did you create a fresh view? If not, It may be caused by "old settings" in the view. Please visit the view, edit the filter and save the view.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.