Browse Source

fix(nc-gui): inconsistent payload datetime format

pull/5678/head
Wing-Kam Wong 1 year ago
parent
commit
980adf38e2
  1. 5
      packages/nc-gui/components/cell/DateTimePicker.vue

5
packages/nc-gui/components/cell/DateTimePicker.vue

@ -105,10 +105,9 @@ let localState = $computed({
}
if (val.isValid()) {
const formattedValue = dayjs(val?.format(isMysql(column.value.base_id) ? 'YYYY-MM-DD HH:mm:ss' : 'YYYY-MM-DD HH:mm:ssZ'))
// setting localModelValue to cater NOW function in date picker
localModelValue = formattedValue
emit('update:modelValue', formattedValue)
localModelValue = dayjs(val)
emit('update:modelValue', dayjs(val).format(isMysql(column.value.base_id) ? 'YYYY-MM-DD HH:mm:ss' : 'YYYY-MM-DD HH:mm:ssZ'))
}
},
})

Loading…
Cancel
Save