Hi, thank you for the comment!
I understand your point, and that's what I also had been thinking too.
At that time, I didn't implement it because I thought there would be some UX flaw like the following:
The user wants to input 2022/01/31, for example.
But the user selected 2022/02/31 as a mistake.
Then the day is cleared, so the user will have to select the day again after selecting the correct month.
So I implemented only checking the invalid combinations of Y-M-D and in that case returning null from the hook so that indicating an error can be implemented on the component layer.
Clearing the day selection can also be a good option, but I could not put it in the core code yet.
Hi, thank you for the comment!
I understand your point, and that's what I also had been thinking too.
At that time, I didn't implement it because I thought there would be some UX flaw like the following:
So I implemented only checking the invalid combinations of Y-M-D and in that case returning
null
from the hook so that indicating an error can be implemented on the component layer.Clearing the day selection can also be a good option, but I could not put it in the core code yet.
Implementation of a correct error message is still at a ticket though: github.com/whitphx/react-ymd-date-...