How to set the default value of ant-design datePicker to empty?

problem description

what to do if ant-design datePicker sets the default value to empty

the environmental background of the problems and what methods you have tried

the following conditions will occur at present

clipboard.png

related codes

/ / Please paste the code text below (do not replace the code with pictures)

<DatePicker showTime defaultValue={moment(listInfo.startTime, dateFormat)}             format={dateFormat}
  onChange={(val) => {
    onUpdateCompensateListInfo("startTime", moment(val, dateFormat))
  }} />

then I set the initial time in redux

    startTime: moment(new Date(), "YYYY-MM-DD HH:mm:ss"),
    endTime: null

when I give a default initial time, it displays normally. When I give the initial value to null, I will error, invalid date, and then the date is all NAN

.

what result do you expect? What is the error message actually seen?

I hope to get a way to initialize my date. Thank you


remove monent ()
from DatePicker defaultValue . First of all, startTime is of the moment type. defaultValue= {moment (null)} is NAN

.
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b22532-2b611.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b22532-2b611.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?