【问题标题】:Datepicker not showing popup日期选择器不显示弹出窗口
【发布时间】:2014-06-19 09:41:07
【问题描述】:

我在我的项目中使用了jquery-ui date picker。但它没有显示弹出窗口..这是代码。请帮助我..

<tr>
    <td>Date of Submit<span class="red">*</span></td>
    <td height="48">:</td>
    <td height="48"><input type="text" id="dateof_sub" name="dateof_sub" class="normal">
    <span class="red" id="date_submit_error"></span></td>
</tr>

<link rel="stylesheet" href="themes/base/jquery.ui.all.css">

<script src="ui/jquery.ui.core.js"></script>
<script src="ui/jquery.ui.widget.js"></script>
<script src="ui/jquery.ui.datepicker.js"></script>
<link rel="stylesheet" href="demos.css">
<script>
    $(function() {
        $( "#dateof_sub" ).datepicker({
            changeMonth: true,
            changeYear: true
        });
    });
</script>

【问题讨论】:

  • 你没有包含 jQuery 文件
  • 您是否收到任何 javascript 错误?
  • 感谢您重播 Shaunak D 先生。但它仍然无法正常工作..它在其他页面中工作。

标签: jquery jquery-ui datepicker


【解决方案1】:

您需要包含 jQuery 引用,以使 jQueryUI 正常工作 - 请参阅 jQueryUI

这两个参考就足够了 - Datepicker

<script src="//code.jquery.com/jquery-1.10.2.js"></script>
<script src="//code.jquery.com/ui/1.10.4/jquery-ui.js"></script>

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-03-06
    • 1970-01-01
    • 1970-01-01
    • 2021-11-17
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多