From 99ce06eb11861e38de63f2a19aad280a46a917c4 Mon Sep 17 00:00:00 2001 From: Rahul Ramesh Date: Tue, 12 Mar 2024 14:38:12 +0530 Subject: [PATCH] [Rahul] | BAH-3522 | Fix. Appointments Month Incorrect Indexing --- openmrs/apps/customDisplayControl/js/customControl.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/openmrs/apps/customDisplayControl/js/customControl.js b/openmrs/apps/customDisplayControl/js/customControl.js index 0f6004f90..dd26e354f 100644 --- a/openmrs/apps/customDisplayControl/js/customControl.js +++ b/openmrs/apps/customDisplayControl/js/customControl.js @@ -176,10 +176,11 @@ angular.module('bahmni.common.displaycontrol.custom') withCredentials: true }); }; - var transformDate = function (dateTime) { - return Bahmni.Common.Util.DateUtil.formatDateWithoutTimeToLocal( - dateTime, - ) + + var transformDate = function (dateTimeArray) { + var dateTime = dateTimeArray.slice(); + dateTime[1] = dateTime[1] - 1 + return Bahmni.Common.Util.DateUtil.formatDateWithoutTimeToLocal(dateTime) } var transformTime = function (dateTime) {