How to validate input outside the component
bhanssens opened this issue · 1 comments
bhanssens commented
Hi,
Again, thanks for this nice component!
In the 24 hours format, I am able to enter 25 and the input field turns red.
However, how can I catch this error outside the component and prevent the user to save a form?
Moreover, when entering 25:00, the result value is 02:00 (which is correct for form validation).
Thanks.
wojtekmaj commented
onInvalid should bubble just fine, so you can catch it on a wrapper (like div, or form) that contains React-TimeRange-Picker, for example :) A best approach would be to probably just trigger native form navigation on form submit.