diff --git a/src/Umbraco.Web.UI.Client/src/views/content/overlays/schedule.controller.js b/src/Umbraco.Web.UI.Client/src/views/content/overlays/schedule.controller.js index 1aad7cf07b..7974103b7a 100644 --- a/src/Umbraco.Web.UI.Client/src/views/content/overlays/schedule.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/content/overlays/schedule.controller.js @@ -99,11 +99,13 @@ } function datePickerShow() { + // prevent the overlay from closing when the date picker is open $scope.model.disableBackdropClick = true; } function datePickerClose() { $timeout(function(){ + // allow the date picker to close now the date picker is closed $scope.model.disableBackdropClick = false; }); } @@ -159,15 +161,12 @@ } function formatDatesToLocal(variant) { - if(variant && variant.releaseDate) { - variant.releaseDateFormatted = dateHelper.getLocalDate(variant.releaseDate, vm.currentUser.locale, "YYYY-MM-DD HH:mm"); + variant.releaseDateFormatted = dateHelper.getLocalDate(variant.releaseDate, vm.currentUser.locale, "MMM Do YYYY, HH:mm"); } - if(variant && variant.removeDate) { - variant.removeDateFormatted = dateHelper.getLocalDate(variant.removeDate, vm.currentUser.locale, "YYYY-MM-DD HH:mm"); + variant.removeDateFormatted = dateHelper.getLocalDate(variant.removeDate, vm.currentUser.locale, "MMM Do YYYY, HH:mm"); } - } function changeSelection(variant) {