fix: handle date/time only when display format not provided (#347)
This commit is contained in:
parent
2c57bc7076
commit
8be590ea89
2
.github/workflows/build.yml
vendored
2
.github/workflows/build.yml
vendored
@ -30,6 +30,8 @@ jobs:
|
||||
yarn install --frozen-lockfile
|
||||
|
||||
- name: Build
|
||||
env:
|
||||
NODE_OPTIONS: "--max-old-space-size=8192"
|
||||
run: |
|
||||
yarn build
|
||||
|
||||
|
@ -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
|
||||
|
@ -98,6 +98,14 @@ const DateTimeControl: FC<WidgetControlProps<string, DateTimeField>> = ({
|
||||
}
|
||||
}
|
||||
|
||||
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]);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user