Browse Source

feat(nc-gui): revise emit model value logic for datetime picker

pull/5601/head
Wing-Kam Wong 2 years ago
parent
commit
8f6382e42c
  1. 6
      packages/nc-gui/components/cell/DateTimePicker.vue

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

@ -64,7 +64,11 @@ let localState = $computed({
} }
if (val.isValid()) { if (val.isValid()) {
emit('update:modelValue', val?.format(isMysql(column.value.base_id) ? 'YYYY-MM-DD HH:mm:ss' : 'YYYY-MM-DD HH:mm:ssZ')) if (isMysql(column.value.base_id)) {
emit('update:modelValue', val?.format('YYYY-MM-DD HH:mm:ss'))
} else {
emit('update:modelValue', dayjs(val).utc().format('YYYY-MM-DD HH:mm:ssZ'))
}
} }
}, },
}) })

Loading…
Cancel
Save