当我尝试使用 2 个日期选择器时,只会弹出第一个。另一个不是我把代码上传到 http://jsfiddle.net/2ed8T/
<link href="http://aymkdn.github.com/Datepicker-for-Bootstrap/css/bootstrap.css" rel="stylesheet">
<link href="http://github-proxy.kodono.info/?q=https://raw.github.com/Aymkdn/Datepicker-for-Bootstrap/master/datepicker.css" rel="stylesheet">
<div class="input-append date" id="dp2" data-date="12-02-2012" data-date-format="dd-mm-yyyy">
<input class="span2" name="date_to" size="16" type="text" value="12-02-2012" readonly>
<span class="add-on"><i class="icon-th"></i></span>
</div>
<div class="input-append date" id="dp3" data-date="12-02-2012" data-date-format="dd-mm-yyyy">
<input class="span2" name="date_to" size="16" type="text" value="12-02-2012" readonly>
<span class="add-on"><i class="icon-th"></i></span>
</div>
<script src="http://aymkdn.github.com/Datepicker-for-Bootstrap/js/jquery-1.7.1.min.js"></script>
<script src="http://github-proxy.kodono.info/?q=https://raw.github.com/Aymkdn/Datepicker-for-Bootstrap/master/bootstrap-datepicker.js"></script>
<script>
$(function(){
$('#dp2').datepicker()({
format: 'mm-dd-yyyy'
});
$('#dp3').datepicker()({
format: 'mm-dd-yyyy'
});
});
</script>