diff --git a/packages/schema/src/plugins/zod/transformer.ts b/packages/schema/src/plugins/zod/transformer.ts index 8b73fe825..6a6ce1169 100644 --- a/packages/schema/src/plugins/zod/transformer.ts +++ b/packages/schema/src/plugins/zod/transformer.ts @@ -114,7 +114,7 @@ export default class Transformer { } else if (inputType.type === 'Boolean') { result.push(this.wrapWithZodValidators('z.boolean()', field, inputType)); } else if (inputType.type === 'DateTime') { - result.push(this.wrapWithZodValidators('z.date()', field, inputType)); + result.push(this.wrapWithZodValidators('z.union([z.date(), z.string().datetime()])', field, inputType)); } else if (inputType.type === 'Json') { this.hasJson = true;