bootstrap日期选择器缺少链接

时间:2016-04-05 05:54:07

标签: jquery twitter-bootstrap datepicker

Hello下面是bootstrap日期选择器的代码,我可能知道它为什么不起作用。我错过了什么链接。

我使用最新版本的bootstrap版本3.3.6。

 <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm2.aspx.cs" Inherits="PrintStudio.WebForm2" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
        <link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css?parameter=1" />
    <link href="http://netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css" rel="stylesheet" />
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <label for="InputMessage">Expected Delivery Date</label>


                <div class='input-group date' id='datetimepicker1'>
                    <input type='text' class="form-control" />
                    <span class="input-group-addon">
                        <span class="glyphicon glyphicon-calendar"></span>
                    </span>
                </div>


       <script type="text/javascript" src="https://code.jquery.com/jquery-2.1.3.min.js"></script>
<script  type="text/javascript"  src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/js/bootstrap.min.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.9.0/moment.min.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datetimepicker/4.17.37/js/bootstrap-datetimepicker.min.js"></script>


    <script type="text/javascript">
        $(function () {
            $('#datetimepicker1').datetimepicker({
                pickTime: false
            });
        });
</script>
    </div>
    </form>
</body>
</html>

1 个答案:

答案 0 :(得分:0)

    <!DOCTYPE html>
    <html xmlns="http://www.w3.org/1999/xhtml">
       <head runat="server">
          <title></title>
          <link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css?parameter=1" />
          <link href="http://netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css" rel="stylesheet" />
       </head>
       <body>
          <form id="form1" runat="server">
             <div>
                <label for="InputMessage">Expected Delivery Date</label>
                <div class='input-group date' id='datetimepicker1'>
                   <input type='text' class="form-control" />
                   <span class="input-group-addon">
                   <span class="glyphicon glyphicon-calendar"></span>
                   </span>
                </div>
             </div>
          </form>
          <script type="text/javascript" src="https://code.jquery.com/jquery-2.1.3.min.js"></script>
          <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.2/js/bootstrap.min.js"></script>
          <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.9.0/moment.min.js"></script>
          <script type="text/javascript" src="https://cdn.rawgit.com/Eonasdan/bootstrap-datetimepicker/a549aa8780dbda16f6cff545aeabc3d71073911e/src/js/bootstrap-datetimepicker.js"></script>
          <script>
             $(document).ready(function () {
                 $('#datetimepicker1').datetimepicker({
                 });
             });
          </script>
       </body>
    </html>

然后使用您喜欢的日期选择器中的选项。