日历-选择入住离开时间 super-calendar

这里写图片描述

效果预览

使用说明

  • 1.引入文件css
    <link rel="stylesheet" href="css/reset.css">
    <link rel="stylesheet" href="css/super-calendar.css">
  • 2.html内容
    <section class="l select-time">
        <p id="rent-time">入住日期 — 离开日期</p>
        <div class="calendar-box clear"></div>
    </section>
  • 3.引入js及js方法调用
<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 回调函数 

猜你喜欢

转载自blog.csdn.net/m0_37285193/article/details/81187656