From dbf8494c4bf86c212df32064ac1457db001566eb Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Tue, 21 Feb 2023 10:23:55 +0000 Subject: [PATCH] Add functional date cell --- .../app/spreadsheet/DateCell.svelte | 60 +++++++++++++++++-- 1 file changed, 56 insertions(+), 4 deletions(-) diff --git a/packages/client/src/components/app/spreadsheet/DateCell.svelte b/packages/client/src/components/app/spreadsheet/DateCell.svelte index c385f98a38..903738ca35 100644 --- a/packages/client/src/components/app/spreadsheet/DateCell.svelte +++ b/packages/client/src/components/app/spreadsheet/DateCell.svelte @@ -1,20 +1,72 @@ -
- {parsedValue} +
+
+ {dayjs(timeOnly ? time : value).format(format)} +
+ {#if selected} + + {/if}
+{#if selected} +
+ onChange(e.detail)} + appendTo={document.getElementById("flatpickr-root")} + enableTime={!dateOnly} + {timeOnly} + time24hr + ignoreTimezones={schema.ignoreTimezones} + /> +
+{/if} +