<div class="bname fl">
创建时间:
<br>
<input type="date" id="startCreatetime" max="">
-
<input type="date" id="endCreatetime" max="">
</div>
<script type="text/javascript">
//日期设置,不可选择今日之后的日期
$(function() {
var now = new Date();
var year = now.getFullYear();
var month = now.getMonth() + 1 < 10 ? "0" + (now.getMonth() + 1)
: (now.getMonth() + 1);
var day = now.getDate() < 10 ? "0" + now.getDate() : now.getDate();
$("#startCreatetime").attr("max", year + "-" + month + "-" + day);
$("#endCreatetime").attr("max", year + "-" + month + "-" + day);
})
</script>