Open pepe95270 opened 1 month ago
Start a new pull request in StackBlitz Codeflow.
It is kind of related to https://github.com/ant-design/ant-design/issues/48265 but I think it's a different issue.
Hi, I would like to work on this issue. Could you please assign it to me?
I don't think it should be connect with the logic minDate
since only part of the date can be limit with minDate
. e.g.
MMYY
DDMMYY
Both typing is valid with the format
:
It should be to provide a parser
api instead of connect with minDate
logic.
@charithmaddoju, pls feel free to PR directly.
A parser API is a very good idea yes 👍
But I think it could also be good to add this behaviour to the default parser. Why format an invalid date (for example a date before minDate) ?
A parser API seems complicated to implement.
Maybe just restricting the default parser to not parse dates out of min/max ranges is simpler.
@zombieJ : In your example, both typing is valid for both format. And both dates are after the minDate. So in your case, it is working as expected. Maybe I understood it wrong but I think it's a different problem (which would be solve with a parser API).
Reproduction link
Steps to reproduce
Set a DatePicker like this :
Then try typping "01011995" (do not copy/paste) Just after finishing typing "010119" the value is wrongly formated as "January 0119" (so we're unable to finish typing "95")
What is expected?
It should not transform "010119" to "January 0119" so the user can finish typing a "valid" date like "01011995".
What is actually happening?
"010119" is wrongly formated to "January 0119" and we're unable to finish writing our date
I know it's a very specific bug but many thanks for the help