Try to type 10:10:1 in the input field and it is replaced by 10:10:01. So we cannot input 10:10:10 using the text input.
I think it is something related to the fact that 10:10:0 is considered valide from DayJs perspective and the corresponding time is 10:10:00. Maybe rc-picker should wait for the final input before parsing with dayjs?
After further investigation, dayjs has an open for strict parsing that should be used:
dayjs("10:10:1", "HH:mm:ss", null, true) // Invalid date
dayjs("10:10:1", "HH:mm:ss") // Valid but false as it resolved to 10:10:01
Following ant design directive to generate picker from DayJs, here is a sandbox: https://codesandbox.io/s/sparkling-silence-i430q
Try to type
10:10:1
in the input field and it is replaced by10:10:01
. So we cannot input10:10:10
using the text input. I think it is something related to the fact that10:10:0
is considered valide from DayJs perspective and the corresponding time is10:10:00
. Maybe rc-picker should wait for the final input before parsing with dayjs?After further investigation, dayjs has an open for strict parsing that should be used:
We could get rid of this problem at this line https://github.com/react-component/picker/blob/234dd2a2659effad08a8e65bfd15f3c8d8bdfbd5/src/generate/dayjs.ts#L118