我想在bootstrap模式中使用两个日期选择器,它在firefox中工作正常,但在chrome中没有。
模态的代码是
<div class = "modal fade" id="add" role="dialog">
<div class = "modal-dialog">
<div class = "modal-content">
<div class = "modal-header">
<h4> Add </h4>
</div>
<div class="modal-body">
<form class="form-horizontal" role="form" action="admin_add_coupon.php" enctype="multipart/form-data" method="post">
<div class="form-group">
<label class="col-md-3 control-label">Expiration Date:</label>
<div class="col-md-8">
<div class="input-group date">
<input type="text" class="form-control" name="expdate">
<span class="input-group-addon"><i class="glyphicon glyphicon-th"></i></span>
</div>
</div>
</div>
<div class="form-group">
<label class="col-md-3 control-label"></label>
<div class="submit">
<input class="btn btn-primary" value="Save Changes" type="submit" name="submit">
<span></span>
</div>
</div>
</form>
</div>
<div class="modal-footer">
<a class="btn btn-primary" data-dismiss="modal"> Close </a>
</div>
</div>
</div>
</div>
js代码是
<script src="http://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.3.0/js/bootstrap-datepicker.js"></script>
<script>
$('.input-group.date').datepicker({
format: "yyyy/mm/dd",
startDate: "2012-01-01",
endDate: "2015-01-01",
todayBtn: "linked",
autoclose: true,
todayHighlight: true
});
</script>
当我在chrome中使用代码时,日期显示不正确。任何人都可以告诉为什么chrome不支持代码