2
0

🚸 (date) Improve date format storage

Make sure it matches what you see on the viewer to avoid confusion
This commit is contained in:
Baptiste Arnaud
2023-04-24 11:25:45 +02:00
parent 7385e3bbbf
commit 3529da210c
3 changed files with 3 additions and 6 deletions

View File

@ -1,6 +1,6 @@
{ {
"name": "@typebot.io/js", "name": "@typebot.io/js",
"version": "0.0.38", "version": "0.0.39",
"description": "Javascript library to display typebots on your website", "description": "Javascript library to display typebots on your website",
"type": "module", "type": "module",
"main": "dist/index.js", "main": "dist/index.js",

View File

@ -24,10 +24,7 @@ export const DateForm = (props: Props) => {
if (inputValues().from === '' && inputValues().to === '') return if (inputValues().from === '' && inputValues().to === '') return
e.preventDefault() e.preventDefault()
props.onSubmit({ props.onSubmit({
value: `${inputValues().from}${ value: parseReadableDate({
props.options?.isRange ? ` to ${inputValues().to}` : ''
}`,
label: parseReadableDate({
...inputValues(), ...inputValues(),
hasTime: props.options?.hasTime, hasTime: props.options?.hasTime,
isRange: props.options?.isRange, isRange: props.options?.isRange,

View File

@ -1,6 +1,6 @@
{ {
"name": "@typebot.io/react", "name": "@typebot.io/react",
"version": "0.0.38", "version": "0.0.39",
"description": "React library to display typebots on your website", "description": "React library to display typebots on your website",
"main": "dist/index.js", "main": "dist/index.js",
"types": "dist/index.d.ts", "types": "dist/index.d.ts",