Skip to content

date-picker always fail to validate in form #4518

@JamesChenX

Description

@JamesChenX
  • I have searched the issues of this repository and believe that this is not a duplicate.

Version

2.2.6

Environment

vue 3.2.2, async-validator 3.5.1

Reproduction link

https://2x.antdv.com/components/form-cn#components-form-demo-basic

Steps to reproduce

  1. Declare:
<a-form :model="formState" :label-col="labelCol" :wrapper-col="wrapperCol">
<a-form-item label="Activity time">
<a-date-picker
v-model:value="formState.date"
show-time
type="date"
:name="registrationDate"
placeholder="Pick a date"
style="width: 100%"
/>
</a-form-item>
......
data() {
    return { formState: {date: null} }
}
  1. Pick a date from the date picker
  2. It will fail with a message like: 'registrationDate' is not a valid undefined
    image

What is expected?

It should not fail to validate

What is actually happening?

After selecting a date from the picker, it just failed to validate

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions