diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 884d1b2b..16079fda 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -30,6 +30,8 @@ jobs: yarn install --frozen-lockfile - name: Build + env: + NODE_OPTIONS: "--max-old-space-size=8192" run: | yarn build diff --git a/packages/core/dev-test/config.yml b/packages/core/dev-test/config.yml index a74e1cbb..bfbeb9c1 100644 --- a/packages/core/dev-test/config.yml +++ b/packages/core/dev-test/config.yml @@ -217,7 +217,7 @@ collections: label: Date widget: datetime format: 'MMM d, yyyy' - date_format: 'MMM d, yyyy' + time_format: false required: false - name: date_with_default label: Date With Deafult diff --git a/packages/core/src/widgets/datetime/DateTimeControl.tsx b/packages/core/src/widgets/datetime/DateTimeControl.tsx index e3c0fef4..f647874c 100644 --- a/packages/core/src/widgets/datetime/DateTimeControl.tsx +++ b/packages/core/src/widgets/datetime/DateTimeControl.tsx @@ -98,6 +98,14 @@ const DateTimeControl: FC> = ({ } } + if (timeFormat === false) { + return 'yyyy-MM-dd'; + } + + if (dateFormat === false) { + return 'HH:mm:ss.SSSXXX'; + } + return "yyyy-MM-dd'T'HH:mm:ss.SSSXXX"; }, [dateFormat, timeFormat]);