Browse Source

fix(gui): remove time part from Date column

re #358

Signed-off-by: Pranav C <61551451+pranavxc@users.noreply.github.com>
pull/365/head
Pranav C 3 years ago
parent
commit
98f3f71394
  1. 2
      packages/nc-gui/components/project/spreadsheet/components/editableCell/datePickerCell.vue

2
packages/nc-gui/components/project/spreadsheet/components/editableCell/datePickerCell.vue

@ -21,7 +21,7 @@ export default {
computed: { computed: {
localState: { localState: {
get() { 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) { set(val) {
this.$emit('input', val && new Date(val).toJSON().slice(0, 10)) this.$emit('input', val && new Date(val).toJSON().slice(0, 10))

Loading…
Cancel
Save