JS如何实现日期多选的功能
发布网友
发布时间:2022-05-11 07:59
我来回答
共3个回答
热心网友
时间:2022-04-22 18:06
只能自己用div实现一个日历了,然后就能随便控制了。
示例如下:
<style>
* {
box-sizing: border-box;
}
.calendar {
width: 300px;
}
.row .day {
width: 20%;
height: 30px;
padding: 5px;
border: 1px solid blue;
background: #9af;
float: left;
text-align: center;
color: #e09;
}
</style>
<div class="calendar">
<div class="row">
<div class="day">1</div>
<div class="day">2</div>
<div class="day">3</div>
<div class="day">4</div>
<div class="day">5</div>
<div class="day">6</div>
</div>
<div class="row">
<div class="day">7</div>
<div class="day">8</div>
<div class="day">9</div>
<div class="day">10</div>
<div class="day">11</div>
<div class="day">12</div>
</div>
<div class="row">
<div class="day">13</div>
<div class="day">14</div>
<div class="day">15</div>
<div class="day">16</div>
<div class="day">17</div>
<div class="day">18</div>
</div>
<div class="row">
<div class="day">19</div>
<div class="day">20</div>
<div class="day">21</div>
<div class="day">22</div>
<div class="day">23</div>
<div class="day">24</div>
</div>
<div class="row">
<div class="day">25</div>
<div class="day">26</div>
<div class="day">27</div>
<div class="day">28</div>
<div class="day">29</div>
<div class="day">30</div>
</div>
</div>
热心网友
时间:2022-04-22 19:24
有日期控件 但要提示一下要加ctrl键
热心网友
时间:2022-04-22 20:59
果断用插件
或者他选择哪个你给哪个添加一个class追问有没有推荐的插荐,或者例子?不好意思,我还是小白阶段~~