From 68178fa4a361b7334b469888923c9a107f519eb8 Mon Sep 17 00:00:00 2001 From: Pranav C Date: Tue, 14 Jun 2022 13:43:06 +0530 Subject: [PATCH] fix: save datetime on 'click:outside' event Signed-off-by: Pranav C --- .../components/editableCell/DateTimePickerCell.vue | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/packages/nc-gui/components/project/spreadsheet/components/editableCell/DateTimePickerCell.vue b/packages/nc-gui/components/project/spreadsheet/components/editableCell/DateTimePickerCell.vue index 07abd59972..6f3566307f 100644 --- a/packages/nc-gui/components/project/spreadsheet/components/editableCell/DateTimePickerCell.vue +++ b/packages/nc-gui/components/project/spreadsheet/components/editableCell/DateTimePickerCell.vue @@ -65,6 +65,13 @@ export default { } }, mounted() { + // listen dialog click:outside event and save on close + if (this.$refs.picker && this.$refs.picker.$children && this.$refs.picker.$children[0]) { + this.$refs.picker.$children[0].$on('click:outside', () => { + this.$refs.picker.okHandler() + }) + } + if (!this.ignoreFocus) { this.$refs.picker.display = true }