summaryrefslogtreecommitdiffstats
path: root/core/js
diff options
context:
space:
mode:
Diffstat (limited to 'core/js')
-rw-r--r--core/js/sharedialogexpirationview.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/core/js/sharedialogexpirationview.js b/core/js/sharedialogexpirationview.js
index 1770bdd5a7b..d1b326a56bc 100644
--- a/core/js/sharedialogexpirationview.js
+++ b/core/js/sharedialogexpirationview.js
@@ -93,6 +93,7 @@
this.$el.find('.expirationDateContainer').toggleClass('hidden', !state);
if (!state) {
// discard expiration date
+ this.model.get('linkShare').expiration = '';
this.model.saveLinkShare({
expireDate: ''
});
@@ -106,8 +107,10 @@
$target.tooltip('hide');
$target.removeClass('error');
+ expiration = moment($target.val(), 'DD-MM-YYYY').format('YYYY-MM-DD');
+ this.model.get('linkShare').expiration = expiration;
this.model.saveLinkShare({
- expiration: moment($target.val(), 'DD-MM-YYYY').format('YYYY-MM-DD')
+ expiration: expiration
}, {
error: function(model, message) {
if (!message) {