Share datepicker fix

Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
This commit is contained in:
John Molakvoæ (skjnldsv) 2017-12-13 11:11:05 +01:00
parent fe43330e73
commit bcad10075e
No known key found for this signature in database
GPG key ID: FB5ACEED51955BF8

View file

@ -513,19 +513,14 @@
var shareId = li.data('share-id'); var shareId = li.data('share-id');
var expirationDatePicker = '#expirationDatePicker-' + this.cid + '-' + shareId; var expirationDatePicker = '#expirationDatePicker-' + this.cid + '-' + shareId;
var view = this; var view = this;
$(expirationDatePicker).closest('div').datepicker({ $(expirationDatePicker).datepicker({
dateFormat : 'dd-mm-yy', dateFormat : 'dd-mm-yy',
onSelect: onSelect: function (expireDate) {
function (expireDate) { view.setExpirationDate(shareId, expireDate);
view.setExpirationDate(shareId, expireDate); }
},
onClose:
function () {
$(expirationDatePicker).removeClass('hidden-visually');
}
}); });
$(expirationDatePicker).focus();
$(expirationDatePicker).addClass('hidden-visually');
}, },
setExpirationDate: function(shareId, expireDate) { setExpirationDate: function(shareId, expireDate) {