Hello all,

I have been struggling with this for a couple of days now. I installed Drupal Rooms module (D7), everything worked just fine, but after fiddling around on the site, the datepicker functionality mysteriously disappeared.

I tried all the possible settings I could think of - with no luck. So (given that I remember it worked out of the box), I decided to create a clean install with a minimum configuration on a test server (btw, you have to install 13 modules as a minimum config to get this up and running :-) ) to examine the differences in the source code.

I have found two major, relevant differences:

1., there are three additional javascripts imported in the head section of the clean install compared to my original site:

/sites/all/modules/jquery_update/replace/ui/ui/minified/jquery.ui.datepicker.min.js?v=1.10.2
/sites/all/modules/date/date_popup/date_popup.js?nmhp32
/sites/all/modules/rooms/js/rooms_date_popup.js?nmhp32

Now these files exist in my previous (non-working) install as well, and I'm guessing they used to be imported originally, I just don't know what I have done to change this.

2. even more interestingly, there is an inline JavaScript right before the end of the head section. The javascripts of the two source files look identical at first, but they are slightly different.

The whole script (the working one) looks like this:

<![CDATA[//><!--
jQuery.extend(Drupal.settings, {"basePath":"\/deleteit\/","pathPrefix":"","ajaxPageState":{"theme":"bartik","theme_token":"FH1CMS8v0Dgz6w4FbqHjKao5Dyj-S3s2XfrT7Hl_nAU","jquery_version":"1.10","js":{"sites\/all\/modules\/jquery_update\/replace\/jquery\/1.10\/jquery.min.js":1,"misc\/jquery.once.js":1,"misc\/drupal.js":1,"sites\/all\/modules\/jquery_update\/replace\/ui\/ui\/minified\/jquery.ui.core.min.js":1,"sites\/all\/modules\/jquery_update\/replace\/ui\/ui\/minified\/jquery.ui.datepicker.min.js":1,"sites\/all\/modules\/date\/date_popup\/jquery.timeentry.pack.js":1,"sites\/all\/modules\/jquery_update\/replace\/ui\/external\/jquery.cookie.js":1,"sites\/all\/modules\/jquery_update\/replace\/misc\/jquery.form.min.js":1,"misc\/ajax.js":1,"sites\/all\/modules\/jquery_update\/js\/jquery_update.js":1,"sites\/all\/modules\/date\/date_popup\/date_popup.js":1,"sites\/all\/modules\/rooms\/js\/rooms_date_popup.js":1,"misc\/progress.js":1},"css":{"modules\/system\/system.base.css":1,"modules\/system\/system.menus.css":1,"modules\/system\/system.messages.css":1,"modules\/system\/system.theme.css":1,"misc\/ui\/jquery.ui.core.css":1,"misc\/ui\/jquery.ui.theme.css":1,"misc\/ui\/jquery.ui.datepicker.css":1,"sites\/all\/modules\/date\/date_popup\/themes\/jquery.timeentry.css":1,"modules\/comment\/comment.css":1,"sites\/all\/modules\/date\/date_api\/date.css":1,"sites\/all\/modules\/date\/date_popup\/themes\/datepicker.1.7.css":1,"modules\/field\/theme\/field.css":1,"modules\/node\/node.css":1,"modules\/search\/search.css":1,"modules\/user\/user.css":1,"sites\/all\/modules\/views\/css\/views.css":1,"sites\/all\/modules\/ctools\/css\/ctools.css":1,"sites\/all\/modules\/rooms\/css\/rooms_ui.css":1,"sites\/all\/modules\/rooms\/css\/rooms_date_range_fields.css":1,"sites\/all\/modules\/rooms\/modules\/rooms_booking_manager\/css\/rooms_booking_search.css":1,"themes\/bartik\/css\/layout.css":1,"themes\/bartik\/css\/style.css":1,"themes\/bartik\/css\/colors.css":1,"themes\/bartik\/css\/print.css":1,"themes\/bartik\/css\/ie.css":1,"themes\/bartik\/css\/ie6.css":1}},"datePopup":{"edit-rooms-start-date-datepicker-popup-0":{"func":"datepicker","settings":{"dateFormat":"dd\/mm\/yy","minDate":"+1d","endDateSelector":"#datepicker-start-date .form-text","changeMonth":true,"changeYear":true,"autoPopUp":"focus","closeAtTop":false,"speed":"immediate","firstDay":0,"yearRange":"-1:+3","fromTo":false,"defaultDate":"0y"}},"edit-rooms-end-date-datepicker-popup-0":{"func":"datepicker","settings":{"dateFormat":"dd\/mm\/yy","minDate":"+1d","startDateSelector":"#datepicker-start-date .form-text","changeMonth":true,"changeYear":true,"autoPopUp":"focus","closeAtTop":false,"speed":"immediate","firstDay":0,"yearRange":"-1:+3","fromTo":false,"defaultDate":"0y"}}},"rooms":{"roomsStartYear":null,"roomsStartMonth":null,"roomsBookingStartDay":1,"roomsDateFormat":"dd\/mm\/yy","datepickers":{"#datepicker-start-date .form-text":{"endDateSelector":"#datepicker-start-date .form-text"}}},"ajax":{"edit-rooms":{"callback":"rooms_booking_availability_search_form_callback","wrapper":"rooms-group-page","event":"change","url":"\/deleteit\/?q=system\/ajax","submit":{"_triggering_element_name":"rooms"}}}});
//--><!]]>

If I save the (non-working) page as a static page, and change these two parts in the source code, the datepicker starts working fine. But obviously, I want Drupal to generate the working code.

Could you, please help me which script is responsible for including the two missing javascript files and injecting the working inline script? It even might be a setting in admin that I unintentionally screwed up, but I don't know where to look.

Any help is very much appreciated.

Cheers,
Zsolt

Comments

ZsoltBalla’s picture

Issue summary: View changes
scalas89’s picture

Hi ZsoltBalla - Can you see the datepicker html code inspecting the page? Maybe a css property like z-index that hides the datepicker?