From 10672ea5340f70cb0b79b836824b78bc93ed45d5 Mon Sep 17 00:00:00 2001 From: charitha Date: Tue, 30 Oct 2018 20:47:31 +0530 Subject: [PATCH] Fixed date format issue in geofencing --- .../app/units/cdmf.unit.geo-dashboard/public/js/app.js | 2 +- .../devicemgt/app/units/cdmf.unit.geo-devices/public/js/app.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.geo-dashboard/public/js/app.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.geo-dashboard/public/js/app.js index 67b20c2a98..fec0b5b280 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.geo-dashboard/public/js/app.js +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.geo-dashboard/public/js/app.js @@ -554,5 +554,5 @@ function formatDate(date) { hours = hours ? hours : 12; // the hour '0' should be '12' minutes = minutes < 10 ? '0'+minutes : minutes; var strTime = hours + ':' + minutes + ' ' + ampm; - return date.getDate() + "/" + date.getMonth()+1 + "/" + date.getFullYear() + " " + strTime; + return date.getDate() + "/" + (date.getMonth() + 1) + "/" + date.getFullYear() + " " + strTime; } \ No newline at end of file diff --git a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.geo-devices/public/js/app.js b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.geo-devices/public/js/app.js index de2b1ec9a4..84e0686f35 100644 --- a/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.geo-devices/public/js/app.js +++ b/components/device-mgt/org.wso2.carbon.device.mgt.ui/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.geo-devices/public/js/app.js @@ -419,7 +419,7 @@ function formatDate(date) { hours = hours ? hours : 12; // the hour '0' should be '12' minutes = minutes < 10 ? '0' + minutes : minutes; var strTime = hours + ':' + minutes + ' ' + ampm; - return date.getDate() + "/" + date.getMonth() + 1 + "/" + date.getFullYear() + " " + strTime; + return date.getDate() + "/" + (date.getMonth() + 1) + "/" + date.getFullYear() + " " + strTime; } function timeSince(date) {