This commit is contained in:
2025-12-11 23:19:43 -03:00
parent 7a9a3ba543
commit 979ef22126
3 changed files with 36 additions and 12 deletions

View File

@@ -1,4 +1,5 @@
import { z } from 'zod'
import { format } from 'date-fns'
export const MAX_ITEMS = 50
@@ -30,7 +31,10 @@ export const enrollment = z.object({
offset_days: z.number()
})
.optional(),
scheduled_for: z.date().optional()
scheduled_for: z
.date()
.optional()
.transform((date) => (date ? format(date, 'yyyy-MM-dd') : undefined))
})
export const formSchema = z.object({