mobx-react-form
mobx-react-form copied to clipboard
moment __proto__ disappear
When I use the momentjs field and call form.update, the proto for the moment field is missing.
Please provide a codesandbox with logging/debug. Thank you.
I'm running into the same issue as this (and probably this), since I'm trying to use the MUI DatePicker component, which outputs a Moment or other library-specific date object, rather than a string.
Here's an example without MUI: https://codesandbox.io/s/form-quickstart-forked-35hj6i
Initially it logs the default value I provided when creating the form, which has a Moment prototype. If you click the Update button, I'm calling form.update and passing it a new Moment object. But after the bind method is called again, the resulting value that gets logged no longer has a Moment prototype.
(I'm not displaying any form fields here, to simplify things.)