arqex / arqex/react-datetime

Clear the value of internal input if cleared value passed as prop

Open
#749 4 comments 10 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
2k
Forks
858
PR merge metrics
No merged PRs in 30d

Description

### I'm Submitting a ...

```
[ ] Bug report
[x] Feature request
[ ] Support request
```

### Expected Results

Without creating a wrapper, it should be possible to clear the value of the `Datetime`'s component input. By having a cleared value, the `Datetime` component should clear the input's value too.

### Actual Results

The `Datetime` component's value is cleared but leaves the input's value uncleared.

### Minimal Reproduction of the Problem

1. Open https://codesandbox.io/s/clear-react-datetime-4zur7
2. Click on the input
3. Select a date via the calendar
4. Press the `clear` button to clear the value passed to `Datetime`

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.