From 3529da210c2415e20cd35c1861fa6d1aad684d02 Mon Sep 17 00:00:00 2001 From: Baptiste Arnaud Date: Mon, 24 Apr 2023 11:25:45 +0200 Subject: [PATCH] :children_crossing: (date) Improve date format storage Make sure it matches what you see on the viewer to avoid confusion --- packages/embeds/js/package.json | 2 +- .../src/features/blocks/inputs/date/components/DateForm.tsx | 5 +---- packages/embeds/react/package.json | 2 +- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/packages/embeds/js/package.json b/packages/embeds/js/package.json index 385178ac8..a27669938 100644 --- a/packages/embeds/js/package.json +++ b/packages/embeds/js/package.json @@ -1,6 +1,6 @@ { "name": "@typebot.io/js", - "version": "0.0.38", + "version": "0.0.39", "description": "Javascript library to display typebots on your website", "type": "module", "main": "dist/index.js", diff --git a/packages/embeds/js/src/features/blocks/inputs/date/components/DateForm.tsx b/packages/embeds/js/src/features/blocks/inputs/date/components/DateForm.tsx index 7d4d18541..e4e3d408d 100644 --- a/packages/embeds/js/src/features/blocks/inputs/date/components/DateForm.tsx +++ b/packages/embeds/js/src/features/blocks/inputs/date/components/DateForm.tsx @@ -24,10 +24,7 @@ export const DateForm = (props: Props) => { if (inputValues().from === '' && inputValues().to === '') return e.preventDefault() props.onSubmit({ - value: `${inputValues().from}${ - props.options?.isRange ? ` to ${inputValues().to}` : '' - }`, - label: parseReadableDate({ + value: parseReadableDate({ ...inputValues(), hasTime: props.options?.hasTime, isRange: props.options?.isRange, diff --git a/packages/embeds/react/package.json b/packages/embeds/react/package.json index f80515979..cdc4a7c9c 100644 --- a/packages/embeds/react/package.json +++ b/packages/embeds/react/package.json @@ -1,6 +1,6 @@ { "name": "@typebot.io/react", - "version": "0.0.38", + "version": "0.0.39", "description": "React library to display typebots on your website", "main": "dist/index.js", "types": "dist/index.d.ts",