From e23ecc5b64f5640e16ec3de3744308098c337a6e Mon Sep 17 00:00:00 2001 From: Megala Date: Tue, 25 Oct 2016 17:34:53 +0530 Subject: [PATCH] Fixing EMM-1779 --- .../services/impl/DeviceManagementAdminServiceImpl.java | 2 +- .../public/templates/operations.hbs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.api/src/main/java/org/wso2/carbon/mdm/services/android/services/impl/DeviceManagementAdminServiceImpl.java b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.api/src/main/java/org/wso2/carbon/mdm/services/android/services/impl/DeviceManagementAdminServiceImpl.java index b7fcd5f92b..2349aa3ef6 100644 --- a/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.api/src/main/java/org/wso2/carbon/mdm/services/android/services/impl/DeviceManagementAdminServiceImpl.java +++ b/components/mobile-plugins/android-plugin/org.wso2.carbon.device.mgt.mobile.android.api/src/main/java/org/wso2/carbon/mdm/services/android/services/impl/DeviceManagementAdminServiceImpl.java @@ -1072,7 +1072,7 @@ public class DeviceManagementAdminServiceImpl implements DeviceManagementAdminSe private static void validateScheduleDate(String dateString){ try { - if (dateString != null) { + if (dateString != null && !dateString.isEmpty()) { SimpleDateFormat sdf = new SimpleDateFormat(DATE_FORMAT); sdf.setLenient(false); sdf.parse(dateString); diff --git a/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/units/mdm.unit.device.operation-bar/public/templates/operations.hbs b/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/units/mdm.unit.device.operation-bar/public/templates/operations.hbs index 0b94ae0881..877ef2e471 100644 --- a/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/units/mdm.unit.device.operation-bar/public/templates/operations.hbs +++ b/components/mobile-plugins/mobile-base-plugin/org.wso2.carbon.device.mgt.mobile.ui/src/main/resources/jaggeryapps/devicemgt/app/units/mdm.unit.device.operation-bar/public/templates/operations.hbs @@ -205,7 +205,7 @@ showDropdowns: true, timePickerIncrement: 1, locale: { - format: 'MM-DD-YYYY hh:mm a' + format: "YYYY-MM-DDTHH:mm:ssZZ" } }); }); @@ -222,7 +222,7 @@ showDropdowns: true, timePickerIncrement: 1, locale: { - format: 'MM-DD-YYYY hh:mm a' + format: "YYYY-MM-DDTHH:mm:ssZZ" } }); }