You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When implementing a custom DateTime component with Zod schema integration, the field is being rendered twice during form initialization. This occurs specifically with a custom DateTimePicker component (tested with shadcn-ui-expansions and other DateTime components).
Current Behavior
The field renders twice with the following pattern:
First render: value: undefined, ref: null
Second render: Correct value and field reference
While only the first version of field is visible in the form UI, the double rendering pattern persists, leaving the field uninitialized despite having the date in proper iso format
Implementation Details
Using AutoForm with custom DateTime component registration:
Description
When implementing a custom DateTime component with Zod schema integration, the field is being rendered twice during form initialization. This occurs specifically with a custom DateTimePicker component (tested with shadcn-ui-expansions and other DateTime components).
Current Behavior
The field renders twice with the following pattern:
value: undefined
,ref: null
While only the first version of field is visible in the form UI, the double rendering pattern persists, leaving the field uninitialized despite having the date in proper iso format
Implementation Details
Using AutoForm with custom DateTime component registration:
with following zustom zod type
Expected Behavior
The component should render once with the correct value and reference.
Enviroment
Aditional context
This behavior has been reproduced with multiple DateTime component implementations (both custom and third-party).
I've tried different approaches to handle the DateTime type:
coerce.date()
date => date.toISOString()
In all cases, the format is correct (ISO format) but the double rendering persists. The only cases where this issue doesn't occur is when:
I can prepare a test repository with reproduction if needed.
The text was updated successfully, but these errors were encountered: