Reproduction link
https://ant.design/components/date-picker
Steps to reproduce
https://ant.design/components/date-picker
In v4 you can type 2020-Q4 to change date
in v5 this no longer works.
What is expected?
When a user types in the quarterly formatted date and then hits enter a change action to occur.
What is actually happening?
Nothing.
| Environment | Info |
| ------------ | ------------ |
| antd | 5.20.0 |
| React | 18 |
| System | mac |
| Browser | Chrome |
This is affecting testing with react test library as well. Generally more tricky to get unit tests to behave as expected for other date picker types. I believe you can still use the original date picker to type in dates, but not for instance weekly or quarterly types.
3条答案
按热度按时间pxyaymoc1#
Seems DayJS not support parse Q as format...
syqv5f0l2#
@zombieJ https://day.js.org/docs/en/plugin/advanced-format
lndjwyie3#
@zombieJ https://day.js.org/docs/en/plugin/advanced-format
This is for format not for parse. Parse use
customParseFormat
. ref iamkun/dayjs#845cc @iamkun