我正在尝试使用以下日期/时间选择器:http://www.malot.fr/bootstrap-datetimepicker/index.php
我创建了一个显示文本输入和日历图标的测试页面,但该页面没有响应。在文本框中键入或单击图标时没有任何反应。以下是我的测试页面的HTML / JavaScript代码:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<script src="../vendor/jquery-2.2.2.min.js"></script>
<link href="../vendor/bootstrap.min.css" rel="stylesheet" type="text/css">
<script src="../vendor/bootstrap.min.js"></script>
<link href="../vendor/bootstrap-datetimepicker.min.css" rel="stylesheet" media="screen">
<script src="../vendor/bootstrap-datetimepicker.min.js" charset="UTF-8"></script>
<script>
$(".form_datetime").datetimepicker({
format: "dd MM yyyy - hh:ii",
autoclose: true,
pickerPosition: "bottom-left"});
</script>
<title>Test Page</title>
</head>
<body>
<div class="container-fluid ctnt">
<form method="post" action="test.php">
<div class="form-group">
<b>Test date / time</b>
<div class="input-group date form_datetime col-md-5" data-date="1979-09-16T05:25:07Z" data-date-format="dd MM yyyy - HH:ii p" data-link-field="dtp_input1">
<input class="form-control" size="16" type="text" value="" readonly>
<span class="input-group-addon"><span class="glyphicon glyphicon-th"></span></span>
</div>
<input type="hidden" id="dtp_input1" value="" /><br/>
</div>
<input type="submit" name="button" value="Submit" class="btn-primary">
<input type="submit" name="button" value="Cancel" class="btn-primary" onclick="return confirm('Abandon any changes?')">
</form>
</div>
</body>
</html>
(更新)我也尝试了这个代码用于选择器:
<div class="input-append date form_datetime">
<input size="16" value="" type="text">
<span class="add-on"><i class="icon-th"></i></span>
</div>
...但它根本没有显示任何图标。