date shortcut

Signed-off-by: Jakob Röhrl <jakob.roehrl@web.de>
This commit is contained in:
Jakob Röhrl
2020-12-30 11:07:11 +01:00
parent bdd9b6d05e
commit 01d8f2815d

View File

@@ -101,6 +101,7 @@
:lang="lang"
:formatter="format"
:disabled="saving || !canEdit"
:shortcuts="shortcuts"
confirm />
<Actions v-if="canEdit">
<ActionButton v-if="copiedCard.duedate" icon="icon-delete" @click="removeDue()">
@@ -176,6 +177,23 @@ export default {
stringify: this.stringify,
parse: this.parse,
},
shortcuts: [
{
text: 'Today',
onClick() {
const date = new Date()
return date
},
},
{
text: 'Tomorrow',
onClick() {
const date = new Date()
date.setTime(date.getTime() + 3600 * 1000 * 24)
return date
},
},
],
}
},
computed: {
@@ -316,6 +334,10 @@ export default {
</script>
<style lang="scss" scoped>
.section-wrapper::v-deep .mx-datepicker-main .mx-datepicker-popup {
left: 0 !important;
}
.section-wrapper {
display: flex;
max-width: 100%;