Share datepicker fix
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
This commit is contained in:
parent
fe43330e73
commit
bcad10075e
1 changed files with 5 additions and 10 deletions
|
@ -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) {
|
||||||
|
|
Loading…
Reference in a new issue