Hi Wim!

When I use HS3 in a content type, that has a CCK date fields, the date picker (Date Popup, current Date API 5.x-2.x-dev) is not showing anymore. When I disable HS for this content type, the date picker popup is working again.

So it seems there is a conflict between HS3 & Date Popup?

Please help - I love & need both modules HS3 AND Date Popup! :)

Cheers, Simon

CommentFileSizeAuthor
#17 date_popup_5.2.3-with_datepicker.zip55.92 KBpivica
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Wim Leers’s picture

Title: Conflict with Date Popup (Date API 5.x-2.x-dev) » jQuery 1.2 compatibility
Project: Hierarchical Select » Date
Version: 5.x-3.x-dev » 5.x-2.x-dev
Component: Code - Taxonomy » Date Popup

I think Date Popup is not yet compatible with jQuery 1.2 then.

Moving to the Date queue.

simon_s’s picture

The point is, that Date Popup works fine also with jQuery 1.2.x but it stops working as soon as HS3 is active at the same page.
It really seems that there is some kind of javascript conflict between the two modules??!

KarenS’s picture

There is a newer version of the jquery calendar popup that I haven't had time to incorporate yet. It has a different API, so I'll have to both get it updated and make changes in the way the code works. Maybe that one will get around the conflicts? I don't know what else to suggest.

KarenS’s picture

Title: jQuery 1.2 compatibility » Date Popup conflict with Hierarchical Select

The newer version won't work out of the box with Drupal 5, so I had to stick with the current version. The new version works requires jQuery 1.2 and works fine in Drupal 6. However, I was able to get the older version working in Drupal 6, which uses jQuery 1.2, so I don't think that is the issue. I could get the older version (the one used in Date 5.2) working with either version of jQuery.

I don't know enough javascript to figure out what the conflict would be, help would be appreciated.

Wim Leers’s picture

Title: Date Popup conflict with Hierarchical Select » jQuery 1.2 compatibility for Date Popup
Project: Date » jQuery Update
Component: Date Popup » Code

This is exactly what I was afraid for when I updated it to jQuery 1.2. But it seemed most modules were already compatible! So I went ahead with it.

Moving to the jquery_update module because it's thanks to them that all modules have moved on to jQuery 1.2. They seem to have done compatibility updates at crazy speeds, so I'm moving it to that issue queue

2c’s picture

Subscribe

realityloop’s picture

subscribe

mackh’s picture

subscribe

ianchan’s picture

subscribe

Taras Zavaliy’s picture

subscribe

jdotti’s picture

subscribe

edit :
But i don't understand why is it a jquery update issue since it is working correctly (jquery update 5.x-2.0 and jQuery 1.2 ) except HS module is enable.

realityloop’s picture

jdotti: I agree, disabling HS allows the date picker to function as normal which is why I initially posted the issue in the HS issue queue.

krisgraham’s picture

Same issue here.

tanjerine’s picture

subscribing

pivica’s picture

Hi guys,

Same problem here - using date_popup 5.x-2.3 with hierarchical_select 5.x-3.0-rc6 on the same page is resulting that date_popup is not working.

After some investigation (but please mind that i ma not js expert) I think that problem is actually caused by effects.core.js that hs is using - when I disabled effects.core.js date_popup started to work - so definitly this is js problem.
I tried to update effects.core.js to last version but that didn't help, date_popus still not worked.

Then I noticed that date_popup is using relatively old ui.calendar.js. After replacing ui.calendar.js with new ui.datepicker.js and quick hacking of date_popup.module everything finally worked :)

So I guess that problem is compatibility between ui.calendar.js and effects.core.js.
New version of date_popup for drupal 6 is using ui.datepicker.js, so when hs get version 6 there should not be any problem. In the mean time I dont know what would be a good solution for 5.

jdotti’s picture

Hi privica,

Where did you find the ui.calendar.js and how do you hack date_popup.module ?

Thanks in advance for your answer.

JD

pivica’s picture

Hi jdotti,

> Where did you find the ui.calendar.js

ui.calendar.js is in date/date_popup/lib/ui.calendar.js

> and how do you hack date_popup.module ?

Basically i downloaded latest ui.datepicker.js and apropriate css from http://ui.jquery.com/, copied it in date_popup and then hacked a little bit date_popup.module so datepicker is used instead of calendar js.

I see that people are interested in this so today i invested little more time and fixed date formatting so it should be now compatible with datepicker js - that means that you can configure input and output view of date through regular date_popup field configuration. Tested a little bit everything and it seems its working ok.

I don't have time for now to create patch for dev version of date_popup - first i don't know is it needed anyway because we are all slowly moving to d6. So I just attached complete hacked date_popup module - just unpack it and copy it over original date_popup 5.x-2.3, and with little luck it should work - remember to clear cache first if its not working.

Couple of notes:
- This is working for me ok, but i didn't test it much, so test everything before thinking to install this on your prod server.
- You can change theaming of date control easily - just go to http://ui.jquery.com/themeroller create custom theme, download it and replace themes/jquery-ui-themeroller.css file.
- Maybe layout of new date control will not be ideal at first (at least it wasn't for me - datepicker was to width) but with little change in your theme css file it should be easy fix.
- I didn't test how my changes are working with time control - but i think that date and time controls are totally separated so there should not be any problem.

Hopes this will help you.

realityloop’s picture

A big thanks to pivica for this!!

Works great for me.

ianchan’s picture

update from #17 worked for us for 5.23 but stopped working for 5.25.

I've almost updated a version of the fix from #17 to work for 5.25. However, I'm running into a problem with placing the separator back into the formatted date.

What happens is:
1. click field
2. popup displays
3. select date
4. "12112008/" is inserted to the field instead of "12/11/2008"

It looks to me like this function (around line 473) isn't being called.

/**
 * Reconstruct popup format string into normal format string.
 *
 * @param string $format
 *   a string in popup format, like YMD-
 * @return string
 *   a normal date format string, like Y-m-d
 */
function date_popup_popup_to_format($format) {
  $sep = substr($format, -1);
  $parts = array();
  ereg('(mm)(dd)(yy)', $format, $parts);
  return implode($sep, $parts);
}

When I remove the above function the popup module still works (without the correct separators).

My question:
Where was date_popup_popup_to_format called from in version 5.23 of the date module?

iam_himanshu’s picture

subscribing...

aac’s picture

Subscribing!!

MMachnik’s picture

I just added this note to a similar issue:

http://drupal.org/node/259681#comment-1684828

In short if you have JS Calendar enabled, try disabling it and see if that helps. It did work for me. I did not have HS but still had the problem with no days appearing in the Date Popup.

lunarbear’s picture

subscribing

drenton’s picture

I changed the speed from immediate to normal in the date_popup.module and now everything seems to work fine. We are using Date 2.7.

Line 236 was changed from :

"speed: 'immediate', \n".

to

"speed: 'normal', \n".

k4ml’s picture

I'm having this problem too today after upgrading to 5.x-2.8. The popup suddenly didn't appear. Applying #24 make it work again.

plan9’s picture

I've just migrated from the Events modules to the Date module and now have no pop up date selector - because I use HS on my site.

Can someone please clarify which versions of Date + HS + hacks from above should work? I've tried the latest module versions and the date picker is lost. If I disable HS it works fine - but I need HS.

heddn’s picture

Issue summary: View changes
Status: Active » Closed (won't fix)

Marking this as won't fixed. 5.x is no longer supported/maintained. If this is still an issue in 7.x, then please re-open.