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) {