From d4c28d9066e11fa5df39024c74f7d78f0e248a11 Mon Sep 17 00:00:00 2001 From: Muhammed Mustafa Date: Sat, 30 Jul 2022 17:31:24 +0530 Subject: [PATCH] refactor/gui-v2-added-DateTime-Picker --- .../components/cell/DateTimePicker.vue | 160 +++++------------- packages/nc-gui-v2/utils/dateTimeUtils.ts | 3 + 2 files changed, 41 insertions(+), 122 deletions(-) diff --git a/packages/nc-gui-v2/components/cell/DateTimePicker.vue b/packages/nc-gui-v2/components/cell/DateTimePicker.vue index 60232a7c25..39ccc68406 100644 --- a/packages/nc-gui-v2/components/cell/DateTimePicker.vue +++ b/packages/nc-gui-v2/components/cell/DateTimePicker.vue @@ -1,146 +1,62 @@ - + diff --git a/packages/nc-gui-v2/utils/dateTimeUtils.ts b/packages/nc-gui-v2/utils/dateTimeUtils.ts index e545ee290c..1a93e8fbe4 100644 --- a/packages/nc-gui-v2/utils/dateTimeUtils.ts +++ b/packages/nc-gui-v2/utils/dateTimeUtils.ts @@ -1,9 +1,12 @@ import dayjs from 'dayjs' import relativeTime from 'dayjs/plugin/relativeTime' +import customParseFormat from 'dayjs/plugin/customParseFormat' + import utc from 'dayjs/plugin/utc' dayjs.extend(utc) dayjs.extend(relativeTime) +dayjs.extend(customParseFormat) export const timeAgo = (date: any) => { return dayjs.utc(date).fromNow()