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 7d88535771
commit 91be2a359b
2 changed files with 23 additions and 1 deletions

View File

@@ -65,7 +65,7 @@
</Actions>
<template>
<div class="filter" v-if="filterVisible">
<div v-if="filterVisible" class="filter">
<h3>{{ t('deck', 'Filter by tag') }}</h3>
<div v-for="label in labelsSorted" :key="label.id" class="filter--item">
<input

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%;