mirror of https://github.com/xwiki-labs/cryptpad
calendar datepicker on mobile now easily toggled #1084
This commit is contained in:
parent
11cd21a2e9
commit
8c32493a01
|
@ -1307,23 +1307,21 @@ ICS ==> create a new event with the same UID and a RECURRENCE-ID field (with a v
|
|||
updateDateRange();
|
||||
updateRecurring();
|
||||
});
|
||||
var f = Flatpickr(goDate, {
|
||||
enableTime: false,
|
||||
defaultDate: APP.calendar.getDate()._date,
|
||||
clickOpens: false,
|
||||
//dateFormat: dateFormat,
|
||||
onChange: function (date) {
|
||||
date[0].setHours(12);
|
||||
f.destroy();
|
||||
APP.moveToDate(+date[0]);
|
||||
updateDateRange();
|
||||
updateRecurring();
|
||||
},
|
||||
});
|
||||
$(goDate).click(function () {
|
||||
var f = Flatpickr(goDate, {
|
||||
enableTime: false,
|
||||
defaultDate: APP.calendar.getDate()._date,
|
||||
//dateFormat: dateFormat,
|
||||
onChange: function (date) {
|
||||
date[0].setHours(12);
|
||||
f.destroy();
|
||||
APP.moveToDate(+date[0]);
|
||||
updateDateRange();
|
||||
updateRecurring();
|
||||
},
|
||||
onClose: function () {
|
||||
setTimeout(f.destroy);
|
||||
}
|
||||
});
|
||||
f.open();
|
||||
f.isOpen ? f.close() : f.open()
|
||||
});
|
||||
APP.toolbar.$bottomL.append(h('div.cp-calendar-browse', [
|
||||
goLeft, goToday, goRight, goDate
|
||||
|
|
Loading…
Reference in New Issue