From 2a884dfd4539deba556e2c8dd0728d77fcf4d524 Mon Sep 17 00:00:00 2001 From: kolaente Date: Sun, 9 Jan 2022 14:21:33 +0100 Subject: [PATCH] fix: now correctly showing the title of predefined ranges --- src/components/date/dateRanges.ts | 10 ++++++++++ src/components/date/datepickerWithRange.vue | 17 ++++------------- src/views/tasks/ShowTasks.vue | 20 ++++++++++++++------ 3 files changed, 28 insertions(+), 19 deletions(-) create mode 100644 src/components/date/dateRanges.ts diff --git a/src/components/date/dateRanges.ts b/src/components/date/dateRanges.ts new file mode 100644 index 000000000..c33d04262 --- /dev/null +++ b/src/components/date/dateRanges.ts @@ -0,0 +1,10 @@ +// TODO: more ranges! +export const dateRanges = { + 'task.show.today': ['now/d', 'now/d+1d'], + 'task.show.thisWeek': ['now/w', 'now/w+1w'], + 'task.show.nextWeek': ['now/w+1w', 'now/w+2w'], + 'task.show.next7Days': ['now', 'now+7d'], + 'task.show.thisMonth': ['now/M', 'now/M+1M'], + 'task.show.nextMonth': ['now/M+1M', 'now/M+2M'], + 'task.show.next30Days': ['now', 'now+30d'], +} diff --git a/src/components/date/datepickerWithRange.vue b/src/components/date/datepickerWithRange.vue index a5aec3f98..d81d02c54 100644 --- a/src/components/date/datepickerWithRange.vue +++ b/src/components/date/datepickerWithRange.vue @@ -57,11 +57,12 @@