Doesn't work `customInput` with mask when use React 18
Describe the bug Can't clear the field when use library of mask when use React 18. The same code works as expected in react 19.
React 19 codesanbox React 18 codesanbox
To Reproduce
- Open codesanbox
- Focus to field
- Clear typed data by keyboard
- Blur field
Expected behavior Data in field should be cleared as in react 19
Screenshots If applicable, add screenshots to help explain your problem.
https://github.com/user-attachments/assets/0c9c76d4-853f-48cd-8b95-09aae924185d
Desktop (please complete the following information):
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]
Smartphone (please complete the following information):
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]
Additional context Add any other context about the problem here.
I also checked react-input-mask behavior the same
@ilchenkoArtem Please take a look at the value + onRawChange props option:
https://codesandbox.io/p/sandbox/react-datepicker-mask-forked-p7g9ph
@ilchenkoArtem Please take a look at the
value+onRawChangeprops option: https://codesandbox.io/p/sandbox/react-datepicker-mask-forked-p7g9ph
This stops working as soon as rawValue has an initial value: https://codesandbox.io/p/devbox/react-datepicker-mask-forked-xvx28l?workspaceId=ws_A5ZEcXgqNumqhheUh5LgRr
@martijnrusschen Could you pls help with it?