I'm making a module and I want to use datepicker.
It works well if I attach datepicker to the first or maybe second textfield of the form, but the vertiacal alignment is wrong if it's attached to elements lower on the page. The position seems to be fixed relative to the top of the page, regardless of collapsible and resizable elements.
Is this a bug or am I doing something wrong?
I use the following code in hook_form()

jquery_ui_add(array("ui.datepicker"));
drupal_add_js('$(document).ready(function(){$("#edit-date").datepicker();});','inline');

Comments

mfer’s picture

This would be a problem with jQuery UI. See http://ui.jquery.com to look into the issue there. This module is a wrapper for that. It provides it's own js and css.

That being said, I use the datepicker every single day and have not encountered this issue. If it's happening it may be tough for others to reproduce so provide lots of detail.

baard’s picture

I know it's only a wrapper, but this issue seems to be closely related to Drupal. I thought someone who knew both jQuery UI and Drupal would be most qualified to answer.

I've made a demonstration. This page can take the weight of the date textbox as a parameter. The alignment is wrong when the date is below the textarea (weight>8).

http://motvind.homeip.net/drupal/datepicker/9

sun’s picture

Status: Active » Closed (won't fix)

This is a bug in the original editor library and cannot be fixed in this module. Please consult the vendor's bugtracker or forum for solutions.