From 8d8bf97dbe9953790c86c70ca9b199372c3ceea7 Mon Sep 17 00:00:00 2001 From: luosongbai <15272473386@163.com> Date: Wed, 6 Jan 2021 15:53:52 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=8F=90=E4=BA=A4=E6=97=B6?= =?UTF-8?q?=E9=97=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pmcalendar.php | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/pmcalendar.php b/pmcalendar.php index 1ca1352..8427f51 100644 --- a/pmcalendar.php +++ b/pmcalendar.php @@ -1087,7 +1087,6 @@ if ($act == 'newevent') { var stmonth = $("#startmonth").val(); var startyear = $("#startyear").val(); - var start = startyear+"-"+moment(stmonth).startOf("month").format("MM-DD")+" " + '00:00:00' var startdate = new Date(start); var startmonth = Date.parse(startdate)/1000; @@ -1601,7 +1600,7 @@ if ($act == 'newevent') { } function onlyShowGame(o) { - console.log(o); + // console.log(o); if (o.value != '') { $('#datarepair').hide(); $('.xian3').css('background-color','#fff'); @@ -1945,12 +1944,20 @@ if ($act == 'newevent') { $("#startmonth").val(time.getMonth() + 1); $("#endyear").val(time.getFullYear()); $("#endmonth").val(time.getMonth() + 1); + + var start = time.getFullYear() + "-"+moment(time.getMonth() + 1).startOf("month").format("MM-DD")+" " + '00:00:00' + var startdate = new Date(start); + var startmonth = Date.parse(startdate)/1000; + + var monthEndDate = new Date(time.getFullYear(), time.getMonth() + 1, 0); + var endmonth=Date.parse(monthEndDate)/1000;//s + endmonth = endmonth+24*60*60 - 1 $.ajax({ url: './?app=pmcalendar&act=getEvents', dataType: 'json', data: { - start: Math.round(starttime.getTime() / 1000), - end: Math.round(endtime.getTime() / 1000), + start: startmonth, + end: endmonth, game: showGame, type: 'charts' },