feat: extended support for NULL indicator

Signed-off-by: mertmit <mertmit99@gmail.com>
This commit is contained in:
mertmit
2023-01-25 16:07:47 +03:00
parent 1350e1ab1e
commit a581bbc7fd
16 changed files with 35 additions and 6 deletions

View File

@@ -79,6 +79,8 @@ watch(
{ flush: 'post' },
)
const placeholder = computed(() => (modelValue === null ? 'NULL' : isDateInvalid ? 'Invalid date' : ''))
useSelectedCellKeyupListener(active, (e: KeyboardEvent) => {
switch (e.key) {
case 'Enter':
@@ -172,8 +174,9 @@ useSelectedCellKeyupListener(active, (e: KeyboardEvent) => {
:show-time="true"
:bordered="false"
class="!w-full !px-0 !border-none"
:class="{ 'nc-null': modelValue === null }"
:format="dateTimeFormat"
:placeholder="isDateInvalid ? 'Invalid date' : ''"
:placeholder="placeholder"
:allow-clear="!readOnly && !localState && !isPk"
:input-read-only="true"
:dropdown-class-name="`${randomClass} nc-picker-datetime ${open ? 'active' : ''}`"