From f3392f9e59612119453ab48b2f4d65daca618e05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20M=C3=BCller?= Date: Fri, 16 Oct 2015 13:47:36 +0200 Subject: Use proper format when setting the expiration date --- core/js/share.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/core/js/share.js b/core/js/share.js index 79fcf61c215..baf5fe5b335 100644 --- a/core/js/share.js +++ b/core/js/share.js @@ -1063,7 +1063,8 @@ $(document).ready(function() { $button.prop('disabled', false); OC.Share.showLink(data.token, null, itemSource); if (data.expiration) { - OC.Share.showExpirationDate(data.expiration); + var expireDate = moment(data.expiration, 'YYYY-MM-DD').format('DD-MM-YYYY'); + OC.Share.showExpirationDate(expireDate); } $('#dropdown').trigger(new $.Event('sharesChanged', {shares: OC.Share.currentShares})); OC.Share.updateIcon(itemType, itemSource); @@ -1207,7 +1208,8 @@ $(document).ready(function() { } if (data.expiration) { - OC.Share.showExpirationDate(data.expiration); + var expireDate = moment(data.expiration, 'YYYY-MM-DD').format('DD-MM-YYYY'); + OC.Share.showExpirationDate(expireDate); } $('#dropdown').trigger(new $.Event('sharesChanged', {shares: OC.Share.currentShares})); }, function(result) { -- cgit v1.2.3