datepicker 有空白div

北京-卫斯理 发布于 2011/12/29 11:17
阅读 1K+
收藏 0

开源软件供应链点亮计划,等你来!>>>

我用的datepicker 是直接在页面上显示的,结果datepicker下面一直有一个空白的div,那个div影响样式,怎么去掉啊,

以下是问题补充:

@北京-卫斯理:生成的是<div id="ui-datapicker-div" class="ui-datepicker ui-widget ui-widget-content ui-helper-clearfix……"》 (2011/12/29 12:56)
加载中
0
子凡
子凡
还没遇到过这种情况,那就把div hide掉不行吗
北京-卫斯理
北京-卫斯理
那个div是自动产生的,不知道是什么原因,生成的是<div id="ui-datapicker-div" class="ui-datepicker ui-widget ui-widget-content ui-helper-clearfix……"》
0
Andre.Z
Andre.Z

你css加一句
#ui-datapicker-div { display:none}
隐藏了试试

北京-卫斯理
北京-卫斯理
还是不行,那个div在页面源码中看不到,我用的是火狐浏览器的web开发者检查看到的,
0
北京-卫斯理
北京-卫斯理
官网上有这么一段话,

The jQuery UI Datepicker plugin uses the jQuery UI CSS Framework to style its look and feel, including colors and background textures. We recommend using the ThemeRoller tool to create and download custom themes that are easy to build and maintain.

If a deeper level of customization is needed, there are widget-specific classes referenced within the jquery.ui.datepicker.css stylesheet that can be modified. These classes are highlighed in bold below.

Sample markup with jQuery UI CSS Framework classes

<div id="ui-datepicker-div" class=" ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all ui-helper-hidden-accessible">
   <div class=" ui-datepicker-header ui-widget-header ui-helper-clearfix ui-corner-all">
      <a class=" ui-datepicker-prev ui-corner-all">title="Prev"><span class="ui-icon ui-icon-circle-triangle-w">Prev</span></a>
      <a class=" ui-datepicker-next ui-corner-all" title="Next"><span class="ui-icon ui-icon-circle-triangle-e">Next</span></a>
      <div class=" ui-datepicker-title">
         <span class=" ui-datepicker-month">January</span><span class=" ui-datepicker-year">2009</span>
      </div>
   </div>
   <table class=" ui-datepicker-calendar">
      <thead>
      <tr>
         <th class=" ui-datepicker-week-end"><span title="Sunday">Su</span></th>
         ...
      </tr>
      </thead>
      <tbody><tr>
         <td class=" ui-datepicker-week-end ui-datepicker-other-month "> 1 </td>
         ...
      </tr>
      </tbody>
   </table>
   <div class=" ui-datepicker-buttonpane ui-widget-content">
      <button type="button" class=" ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all">Today</button>
      <button type="button" class=" ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all">Done</button>
   </div>
</div>

Note: This is a sample of markup generated by the datepicker plugin, not markup you should use to create a datepicker. The only markup needed for that is <input type="text" /> or <div></div>.

里面有这个,和我页面上的一样。

<div id="ui-datepicker-div" class="ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all ui-helper-hidden-accessible">。大侠们怎么去掉啊?

0
北京-卫斯理
北京-卫斯理
呵呵,解决了,css源码中有.ui-datepicker { width: 17em; padding: .2em .2em 0;  font-size: 70%; display: none;}   之前我改过显示大小,把display: none;给删除了,才出来的那个div。现在加上了,好了。谢谢各位的留言
OSCHINA
登录后可查看更多优质内容
返回顶部
顶部