I have the following problem:
I am using ant.design in version 5.2.0. When I use the component as follows, I always get the attached error message when I pass a date to for the Form.Item in dayjs format: enter image description here
If I don't specify the default value as dayjs <form>
I don't get an error, but I also don't get a prefilled value in the datepicker.
What else can I try?
Here is an excerpt of the source code:
<Form
form={formRef}
onFinish={handleSubmit}
initialValues={{...collaboration, dueDate: dayjs(collaboration.dueDate)}}
>
<Form.Item label="DatePicker" name={"dueDate"} rules={[{ required: true, message: 'Please select time!' }]}>
<DatePicker style={{width: "100%"}}/>
</Form.Item>
</Form>