我有一个输入字段,其中添加了一个日期选择器。
出于某种原因,当我单击输入字段时,日期选择器将不会打开,但是如果单击它,日期选择器将打开并填写该字段中的数据。

这是HTML:

<div class="row">
  <label for="video_due_date">Birthday Date</label>
  <div class="text">
    <input id="video_due_date" name="video[due_date]" size="30" type="text" value="2011-12-24 13:51:58 UTC" />
  </div>
</div>


这是CSS:

.sign-form .row .text,
.sign-form .place-holder{
    float:left;
    background:url(../images-2/sprite-form.gif) no-repeat 0 -44px;
    position:relative;
    height:38px;
}


这是JS的代码:

<script type="text/javascript">
$(document).ready(function() {
  $('#video_due_date').datepicker({minDate: 0,
                                   dateFormat: 'yy-mm-dd     00:00:00'
                                  });
});
</script>


您知道什么可能导致此问题吗?为了使日期选择器从田地内部而不是周围区域打开,我应该改变什么?

谢谢,
可人

最佳答案

好。得到它了。
.row:课后有问题。
这是工作版本:

.row:after{content:"\0020";display:block;height:0;clear:both;visibility:hidden;overflow:hidden;}


这段代码是从蓝图css框架复制的。

Here是所有代码。

关于css - jQuery UI datepicker不从输入字段显示,而仅从输入字段显示,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/8284557/

10-11 15:12
查看更多