We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 049d560 commit a1813caCopy full SHA for a1813ca
src/admin/components/forms/field-types/DateTime/index.tsx
@@ -88,7 +88,9 @@ const DateTime: React.FC<Props> = (props) => {
88
{...date}
89
placeholder={getTranslation(placeholder, i18n)}
90
readOnly={readOnly}
91
- onChange={readOnly ? undefined : setValue}
+ onChange={(incomingDate) => {
92
+ if (!readOnly) setValue(incomingDate.toISOString());
93
+ }}
94
value={value as Date}
95
/>
96
</div>
test/fields/collections/Date/index.ts
@@ -5,7 +5,7 @@ export const defaultText = 'default-text';
5
const DateFields: CollectionConfig = {
6
slug: 'date-fields',
7
admin: {
8
- useAsTitle: 'date',
+ useAsTitle: 'default',
9
},
10
fields: [
11
{
0 commit comments