Jquery UI Datepicker 不显示 [英] Jquery UI Datepicker not displaying

查看:37
本文介绍了Jquery UI Datepicker 不显示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

更新
我已经恢复到 Jquery 1.3.2 并且一切正常,但不确定问题是/曾经是什么,因为除了 jquery 和 ui 库版本之外,我没有更改任何其他内容.
更新结束

我在使用 JQuery UI datepicker 时遇到问题.日期选择器被附加到一个类并且该部分正在工作,但日期选择器没有被显示.

I having an issue with the JQuery UI datepicker. The datepicker is being attached to a class and that part is working but the datepicker is not being displayed.

这是我正在使用的日期选择器代码以及当我单击具有.datepicker"类的输入框时生成的内联样式.

Here is the datepicker code I am using and the inline style that is being generated when I click in the input box that has the class ".datepicker".

$('.datepicker').datepicker({dateFormat:'dd/mm/yy'});

display:none;
left:418px;
position:absolute;
top:296px;
z-index:1;

如果我将 display:none 更改为 display:block,则日期选择器工作正常,但在我选择日期时它不会关闭.

If I change the display:none to display:block the datepicker works fine except it dosen't close when I select a date.

正在使用的 Jquery 库:

Jquery libraries in use:

  • jQuery JavaScript 库 v1.4.2
  • jQuery UI 1.8 jQuery UI 小部件 1.8
  • jQuery UI 鼠标 1.8 jQuery UI
  • Position 1.8 jQuery UI Draggable 1.8
  • jQuery UI Droppable 1.8 jQuery UI
  • 日期选择器 1.8

推荐答案

是新建的css文件不行.尝试在标题中也包含旧的 1.7.* css 文件,然后重试.

it's the css file in the new one doesn't work. Try to include the old 1.7.* css file on your header too, and try again.

此外,您是否尝试在构建后立即执行 .datepicker("show")?

Also, did you try to do a .datepicker( "show" ) right after it constructed?

这篇关于Jquery UI Datepicker 不显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆