From c323de8bb95c32e30a190f92f321ec5979e5f918 Mon Sep 17 00:00:00 2001 From: kimre Date: Fri, 15 Jul 2022 20:41:35 +0900 Subject: [PATCH] =?UTF-8?q?=EC=A0=95=EC=82=B0=EC=9D=B4=EB=A0=A5=20?= =?UTF-8?q?=EC=9B=94=20=EA=B2=80=EC=83=89=20=EA=B8=B0=EA=B0=84=20=ED=99=9C?= =?UTF-8?q?=EC=84=B1=ED=99=94=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/modules/calculate/views/CalcList.vue | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/frontend/src/modules/calculate/views/CalcList.vue b/frontend/src/modules/calculate/views/CalcList.vue index c54bfbe..eb57333 100644 --- a/frontend/src/modules/calculate/views/CalcList.vue +++ b/frontend/src/modules/calculate/views/CalcList.vue @@ -381,18 +381,22 @@ export default { closeDate(type) { if (type != undefined && type != null) { let initStartDate = new Date(); + let initEndDate = new Date(); initStartDate.setMonth(Number(moment(initStartDate).format('MM')) - 4) + initEndDate.setMonth(Number(moment(initEndDate).format('MM')) - 2) + + if (type == 'start') { this.disabledSDate = {to: initStartDate, from: new Date()}; if (this.startDate !== initStartDate) { - this.disabledEDate = {to: this.startDate, from: new Date()}; + this.disabledEDate = {to: this.startDate, from: initEndDate}; } } else if (type == 'end') { - this.disabledEDate = {to: initStartDate, from: new Date()}; - if (this.endDate !== new Date()) { + this.disabledEDate = {to: initStartDate, from: initEndDate}; + if (this.endDate !== initEndDate) { this.disabledSDate = {from: this.endDate}; - this.disabledSDate = {to: initStartDate, from: new Date()}; + this.disabledSDate = {to: initStartDate, from: initEndDate}; } } } @@ -483,7 +487,7 @@ export default { }, initSetEndDate() { let initEndDate = new Date(); - initEndDate.setMonth(Number(moment(initEndDate).format('MM')) - 1); + initEndDate.setMonth(Number(moment(initEndDate).format('MM')) - 2); this.endDate = initEndDate; // console.log(moment(this.endDate).format('YYYY-MM-DD')); },