Using:
jquery_update 6.x-2.x-dev (jquery 1.3)
jquery_ui 6.x-1.x-dev (jqueryui 1.7.2)
Also happened with:
jquery_update 6.x-1.1 (jquery 1.2)
jquery_ui 6.x-1.3 (jqueryui 1.6?)
The date picker popup doesn't look for an applied jqueryui theme, as far as I can tell, but it does attempt load files if the jquery_ui module exists (in the date_popup_load() function). This can result in unexpected theming of the datepicker. A bit of cooperation with jquery_ui could fix this up.
In query_ui #388384: Allow usage of jQuery UI themes from the themeroller, there is some activity towards exposing jquery ui themes to the rest of the system. With that patch applied (as well as jquery_ui #578402: Call to absent js script for a somewhat related issue), date_popup.module can be modified to show a fully jquery-UI themed datepicker. Here are the changes I made:
date_popup_init(): The css should depend upon whether a jquery UI theme is present, rather than always using the module css.
//drupal_add_css(drupal_get_path('module', 'date_popup') .'/themes/datepicker.css');
date_popup_load(): Since the jquery_ui module test is here, set the css here.
if (module_exists('jquery_ui')) {
$css = variable_get('jquery_ui_theme', '') ?
drupal_get_path('module', 'jquery_ui') .'/jquery.ui/'. variable_get('jquery_ui_theme', 'base') :
drupal_get_path('module', 'date_popop') .'/themes/datepicker.css';
drupal_add_css($css);
jquery_ui_add('ui.datepicker');
}
else {
drupal_add_css(drupal_get_path('module', 'date_popup') .'/themes/datepicker.css');
drupal_add_js($path .'/lib/ui.datepicker.js');
}
The jquery_ui_theme variable is part of #388384: Allow usage of jQuery UI themes from the themeroller.
I've not supplied a proper patch since I suspect there may be other considerations if trying to get all three of these (my code above and the 2 jquery_ui patches) integrated across both modules.
Comment | File | Size | Author |
---|---|---|---|
#1 | date_popup.jquery_ui.datepicker.patch | 358 bytes | nicholasThompson |
Comments
Comment #1
nicholasThompsonI applied the patch from #30 in #388384: Allow usage of jQuery UI themes from the themeroller. This allows JQueryUI to pickup on custom themes and appears to work perfectly.
I only had to make one small change to date_popup.module... In
date_popup_init
, I had to addThis was to stop the popup module inserting its own CSS which broke the themeroller's css.
That's all I needed to do...
Comment #2
b0r7 CreditAttribution: b0r7 commentedjust applied the patch, works great.. thx
Comment #3
Fabianx CreditAttribution: Fabianx commentedThere is an easier way:
In you theme .info file do:
and add an empty datepicker.css to your theme.
Then clear theme cache.
As this can be done via theming, I consider this a "won't fix".
Best Wishes,
Fabian (LionsAd)
Comment #4
mansspams CreditAttribution: mansspams commentedFabianx, empty datepicker.css does not work. Only removing themes from date_popup helped.
Comment #5
Fabianx CreditAttribution: Fabianx commentedLavaMeTender ak,
This solution does work for me. I have the solution running perfectly on a production site.
Steps to do:
1) Edit your theme .info file and add
2) Add an empty datepicker.css to the root of your theme.
3) Clear your theme cache.
Comment #6
kenorb CreditAttribution: kenorb commentedThe same problem, I can't use datepicker with date_popup module enabled, because of the theme conflict.
I had to disable date_popup module.
Any solution available?
Comment #7
fugazi CreditAttribution: fugazi commentedsame probleme
Comment #8
jiv_e CreditAttribution: jiv_e as a volunteer commentedThis issue is getting old with no activity. I'm cleaning the issue queue, so I'll close this. Please feel free to reopen if needed!