Merge pull request #2710 from nextcloud/enh/dateShortcuts3
This commit is contained in:
@@ -101,6 +101,7 @@
|
|||||||
:lang="lang"
|
:lang="lang"
|
||||||
:formatter="format"
|
:formatter="format"
|
||||||
:disabled="saving || !canEdit"
|
:disabled="saving || !canEdit"
|
||||||
|
:shortcuts="shortcuts"
|
||||||
confirm />
|
confirm />
|
||||||
<Actions v-if="canEdit">
|
<Actions v-if="canEdit">
|
||||||
<ActionButton v-if="copiedCard.duedate" icon="icon-delete" @click="removeDue()">
|
<ActionButton v-if="copiedCard.duedate" icon="icon-delete" @click="removeDue()">
|
||||||
@@ -176,6 +177,48 @@ export default {
|
|||||||
stringify: this.stringify,
|
stringify: this.stringify,
|
||||||
parse: this.parse,
|
parse: this.parse,
|
||||||
},
|
},
|
||||||
|
shortcuts: [
|
||||||
|
{
|
||||||
|
text: t('deck', 'Today'),
|
||||||
|
onClick() {
|
||||||
|
const date = new Date()
|
||||||
|
date.setDate(date.getDate())
|
||||||
|
date.setHours(23)
|
||||||
|
date.setMinutes(59)
|
||||||
|
return date
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: t('deck', 'Tomorrow'),
|
||||||
|
onClick() {
|
||||||
|
const date = new Date()
|
||||||
|
date.setDate(date.getDate() + 1)
|
||||||
|
date.setHours(23)
|
||||||
|
date.setMinutes(59)
|
||||||
|
return date
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: t('deck', 'Next week'),
|
||||||
|
onClick() {
|
||||||
|
const date = new Date()
|
||||||
|
date.setDate(date.getDate() + 7)
|
||||||
|
date.setHours(23)
|
||||||
|
date.setMinutes(59)
|
||||||
|
return date
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: t('deck', 'Next month'),
|
||||||
|
onClick() {
|
||||||
|
const date = new Date()
|
||||||
|
date.setDate(date.getDate() + 30)
|
||||||
|
date.setHours(23)
|
||||||
|
date.setMinutes(59)
|
||||||
|
return date
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@@ -316,6 +359,14 @@ export default {
|
|||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
|
||||||
|
.section-wrapper::v-deep .mx-datepicker-main.mx-datepicker-popup {
|
||||||
|
left: 0 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.section-wrapper::v-deep .mx-datepicker-main.mx-datepicker-popup.mx-datepicker-sidebar {
|
||||||
|
padding: 0 !important;
|
||||||
|
}
|
||||||
|
|
||||||
.section-wrapper {
|
.section-wrapper {
|
||||||
display: flex;
|
display: flex;
|
||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
|
|||||||
Reference in New Issue
Block a user