mirror of
https://github.com/cryptpad/cryptpad.git
synced 2026-09-14 11:05:41 +05:00
Merge pull request #1368 from cryptpad/mobile_calendar_datepicker
Calendar datepicker on mobile now easily toggled
This commit is contained in:
commit
a1646bd0dd
@ -1307,23 +1307,20 @@ 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);
|
||||
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();
|
||||
return f.isOpen ? f.close() : f.open();
|
||||
});
|
||||
APP.toolbar.$bottomL.append(h('div.cp-calendar-browse', [
|
||||
goLeft, goToday, goRight, goDate
|
||||
|
||||
Loading…
Reference in New Issue
Block a user