Browse Source

fix: year field

pull/6323/head
DarkPhoenix2704 1 year ago
parent
commit
0ecf4b9f02
  1. 14
      packages/nc-gui/components/cell/YearPicker.vue

14
packages/nc-gui/components/cell/YearPicker.vue

@ -1,6 +1,16 @@
<script setup lang="ts">
import dayjs from 'dayjs'
import { ActiveCellInj, ReadonlyInj, computed, inject, onClickOutside, ref, useSelectedCellKeyupListener, watch } from '#imports'
import {
ActiveCellInj,
EditColumnInj,
ReadonlyInj,
computed,
inject,
onClickOutside,
ref,
useSelectedCellKeyupListener,
watch,
} from '#imports'
interface Props {
modelValue?: number | string | null
@ -69,7 +79,7 @@ const placeholder = computed(() => {
return '(Optional) Select default year'
} else if (modelValue === null && showNull.value) {
return 'NULL'
} else if (isTimeInvalid.value) {
} else if (isYearInvalid.value) {
return 'Invalid year'
} else {
return ''

Loading…
Cancel
Save