Hi, i have a problem to load array default value. My code like this:
datevisits: z
.array(
z.object({
date: z.date().optional(),
time: z
.string()
.regex(
/^([0-1]?[0-9]|2[0-3]):[0-5][0-9]$/,
"Time must be in format HH:MM (24 hours format)"
)
.optional(),
})
)
.describe("Date Visits")
.default(data.date_visits || []),
Hi, i have a problem to load array default value. My code like this:
the data.date_visits will have value like this:
The page loaded, but the date visits value are not set, and when i try to add date visits, date and string field are vanished.