From ff863933bd37acd39ca17604e39e95dba04341fb Mon Sep 17 00:00:00 2001 From: Jen Beckett <115109120+jenbeckett@users.noreply.github.com> Date: Wed, 30 Oct 2024 12:53:05 -0700 Subject: [PATCH] fixed dates for timezone --- .../src/views/supp-allowances/SupplementaryFormView.vue | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/frontend/src/views/supp-allowances/SupplementaryFormView.vue b/frontend/src/views/supp-allowances/SupplementaryFormView.vue index 27ebe698..1d138347 100644 --- a/frontend/src/views/supp-allowances/SupplementaryFormView.vue +++ b/frontend/src/views/supp-allowances/SupplementaryFormView.vue @@ -549,9 +549,9 @@ export default { }, setSuppTermDates() { const today = new Date() - const formattedEndDate = new Date(this.fundingAgreement.endDate) - const termTwoEndDate = moment(formattedEndDate).subtract(1, 'years').toDate() - const termOneEndDate = moment(formattedEndDate).subtract(2, 'years').toDate() + const formattedEndDate = moment(this.fundingAgreement?.endDate).endOf('day').toDate() + const termTwoEndDate = moment(formattedEndDate).subtract(1, 'years').endOf('day').toDate() + const termOneEndDate = moment(formattedEndDate).subtract(2, 'years').endOf('day').toDate() switch (true) { //not having a funding agreement or FA end date will only happen if a user navigates to SuppApp right after