Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Trouble with jQuery Dialog and Datepicker plugins

I have a dialog, and I have a datepicker field on the dialog.

When I open the dialog and click in the datepicker field, the datepicker panel show behind dialog.

I try more properties: zindex, stack, bgiframe, but not success.

Someone can help me?

Tks.

like image 504
Renato Bezerra Avatar asked Apr 03 '09 20:04

Renato Bezerra


People also ask

Why datepicker is not working in HTML?

You need to include jQuery, and include it before jQuery UI. You also need to move your code to the end of your document or wrap it in a document ready call. Include a reference to jQuery before jQuery UI. Thanks for the response .

How datepicker is implemented in jQuery?

Date: The datepicker is tied to a standard form input field. Focus on the input (click, or use the tab key) to open an interactive calendar in a small overlay. Choose a date, click elsewhere on the page (blur the input), or hit the Esc key to close.

How do I fix my datepicker position?

To change the position of the jQuery UI Datepicker just modify . ui-datepicker in the css file. The size of the Datepicker can also be changed in this way, just adjust the font size.


1 Answers

Old Answer

z-index (note the hyphen!) is the property that matters. Make sure you set it greater than the dialogue, and make sure you set it on the correct element. Here's how we do it:

#ui-datepicker-div  {  z-index: 1000; /* must be > than popup editor (950) */ } 

API Change - April 17, 2010

In the CSS file for the date picker, find the .ui-datepicker item and change it:

.ui-datepicker { width: 17em; padding: .2em .2em 0; z-index: 9999 !important; } 

Using z-index: 9999 !important; worked in Firefox 3.5.9 (Kubuntu).

like image 106
Craig Stuntz Avatar answered Sep 16 '22 18:09

Craig Stuntz