From 98f3f71394fadc084d52af9ce7335597d3ef6ee2 Mon Sep 17 00:00:00 2001 From: Pranav C <61551451+pranavxc@users.noreply.github.com> Date: Wed, 21 Jul 2021 15:04:38 +0530 Subject: [PATCH] fix(gui): remove time part from Date column re #358 Signed-off-by: Pranav C <61551451+pranavxc@users.noreply.github.com> --- .../spreadsheet/components/editableCell/datePickerCell.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/nc-gui/components/project/spreadsheet/components/editableCell/datePickerCell.vue b/packages/nc-gui/components/project/spreadsheet/components/editableCell/datePickerCell.vue index 82bef51d51..ee47dce529 100644 --- a/packages/nc-gui/components/project/spreadsheet/components/editableCell/datePickerCell.vue +++ b/packages/nc-gui/components/project/spreadsheet/components/editableCell/datePickerCell.vue @@ -21,7 +21,7 @@ export default { computed: { localState: { get() { - return typeof this.value === 'string' ? this.value.replace(/(\d)T(?=\d)/, '$1 ') : (this.value && new Date(this.value)) + return typeof this.value === 'string' ? this.value.replace(/(\d)T(?=\d)/, '$1 ').replace(/\s\d{2}:\d{2}:[\d:.]+z?$/i, '') : (this.value && new Date(this.value)) }, set(val) { this.$emit('input', val && new Date(val).toJSON().slice(0, 10))