<!-- html-->
<div class="home_lef_weekly">
<!-- 上 -->
<div id="daterange" style="width: 190px;">
<input type="text" id="rangeTime" name="rangeTime" autocomplete="off" class="layui-input" placeholder="最近一周">
</div>
<!-- 下 -->
<div style="position:relative">
<div id="weekly_ech" style="width: 100%;height:380px;position: absolute;"></div>
</div>
</div>
let dateList;
layui.use('laydate', function () {
let laydate = layui.laydate;
newWeek();
laydate.render({
elem: '#rangeTime',
type: 'date',
range: '--',
value: (startDate) + " -- " + (endDate)
, done: function (value, date, endDatexx) {
var startsQuery = value.split('-').join("").split(" ")[0];
var starts = value.split('--').join("").split(" ")[0];
var endsQuery = value.split('-').join("").split(" ")[1];
var ends = value.split('--').join("").split(" ")[1];
var secondDays = DateDiff(ends, starts) + 1;
var NewDate = getDate(value.split('--').join("").split(" ")[1]);
dateList = [];
for (let i = secondDays - 1; i >= 0; i--) {
dateList.push(formatDate(new Date