Jquery datepicker在lightbox中不起作用

Dav*_*ave 0 jquery overlay datepicker lightbox

一些问题解决后,我得到了一些棘手的东西.我正在使用一个名为prettyPhoto的JQuery叠加插件.

Just wanna make an overlay with a form. The form is hidden with CSS, and when a link is clicked, the overlay shows it in a nice fashion.

So far so good, everything working as expected, except only one thing: this form has a date field, in which I use datepicker UI.

It (the datepicker) does no shows up at all. At first, I tryed googling and making some CSS adjustments... nothing works. z-index on CSS, z-index dynamically...

Then I used Firebug to keep an eye. Datepicker usually sets its properties just when the listener element is clicked, dynamically. On this form inside the overlay, when I click the listener field, the datepicker div does not change at all.

Any ideas on how get this working?

参考文献: 网站是:http://davedev.com.br/projects/jdc/v1/pt/reserva.php 是的,它是葡萄牙语.只需单击屏幕右下角的卡通对话框即可查看叠加层.

我正在使用谷歌apis CDN的jquery和jquery-ui.

我正在开发和测试Ubuntu,Firefox 3.6.7(Chrome 5和Opera 10.60).

是的,我正在使用一些HTML5元素和一些CSS3效果(卡通对话框气球完全用CSS3制作.没有图像.=]).

Gré*_*une 6

使用这里提出的解决方案,我设法使日期选择器在灯箱中显示/消失(prettyphoto)但是在选择日期时仍然存在javascript错误(f为空).

几个小时后,这是我的完整解决方案:

$("#datepicker").live('focus', function(){ 
                 $(this).attr("id","datepickerNEWID");                 
                 $(this).datepicker();
});
Run Code Online (Sandbox Code Playgroud)

因为lightbox创建了一个带有div内容副本的新DOM,所以我们有2个输入具有相同的ID,导致datepicker无法工作,所以我所做的就是更改datepicker id.

希望能帮助到你!