为什么浏览器不显示我的日历?

时间:2016-03-22 20:18:18

标签: javascript jquery html calendar

我找到了使用js

在HTML中实现日历的代码

就在这里:http://webdesignandsuch.com/add-a-calendar-date-picker-to-a-form-with-jquery/

我的以下代码,它不起作用。

<div class="row">
    <div class="col-lg-4 text-center">
        <div class="panel panel-default">                       
            <div class="panel-body">
                Escolha a data do jogo:
                </br>
                </br>

                <form>
                <link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/themes/smoothness/jquery-ui.css" type="text/css">

                <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
                <script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/jquery-ui.min.js"></script>
                <script>
                    $(document).ready(function() {
                    $("#datepicker").datepicker();
                    });
                </script>
                <input id="datepicker" class="form-control" placeholder="Seu jogo será às..." />
                </form>
            </div>
        </div>
    </div>

1 个答案:

答案 0 :(得分:0)

您在此处粘贴的代码运行正常。我认为你在datepicker()电话之前有一个js问题。您可以尝试检查浏览器控制台日志或在此处粘贴更多代码。

<link href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/themes/smoothness/jquery-ui.css" rel="stylesheet"/>
<div class="row">
    <div class="col-lg-4 text-center">
        <div class="panel panel-default">                       
            <div class="panel-body">
                Escolha a data do jogo:

                <form>
              

                <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
                <script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/jquery-ui.min.js"></script>
                <script>
                    $(document).ready(function() {
                    $("#datepicker").datepicker();
                    });
                </script>
                <input id="datepicker" class="form-control" placeholder="Seu jogo será às..." />
                </form>
            </div>
        </div>
    </div>