效果预览
使用说明
<link rel="stylesheet" href="css/reset.css">
<link rel="stylesheet" href="css/super-calendar.css">
<section class="l select-time">
<p id="rent-time">入住日期 — 离开日期</p>
<div class="calendar-box clear"></div>
</section>
<script src="js/jquery-3.1.1.min.js"></script>
<script src="js/limitTextNum.js"></script>
<script src="js/super-calendar.js"></script>
<script>
$(".calendar-box").superCalendar({
target: "#rent-time",
callback: function(date) {
console.log(date)
}
});
</script>
API介绍
1. target 点击对象
2. callback 回调函数