Closed
Description
🐛 bug report
Description of the problem
If a SemanticDatepicker
has a value
property being passed in, setting the property to null
does not cause the inner Input
element value
to change if clearOnsameDateClick
is false. This results in the text not updating, even though the value of the component has been updated.
In the sandbox link below, perform the following actions:
- Select a date value
- Click the "Set to Null" button
- Inspect the components in React DevTools. The outer
SemanticDatepicker
has a correct value ofnull
, but the innerInput
has the old value.
How has this issue affected you? What are you trying to accomplish?
This is a blocker when using Formik
to handle the field's value. Specifically, I am trying to have Formik "reset" the form (I have a form inside a modal and want the form to clear when the modal is opened again). Formik's resetForm()
will update all the field values, giving the SemanticDatepicker
a new default value of null
; visually, however, the form still has the previous value.
Link to a sandbox: here
Metadata
Metadata
Assignees
Labels
No labels