arqex / arqex/react-datetime

Datetime auto-opening on Webkit/Safari

Open
#870 1 comment 0 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 ...
```
[x] Bug report
[ ] Feature request
[ ] Support request
```

### Steps to Reproduce
1. Open Safari (I'm using version 17.5)
2. Instantiate a `` with `open={undefined}`, `inputProps={{someProps}}`, `renderInput={someJsx}`, specifically not specifying the `input` prop.
3. See that the input is focused and the date picker menu is open

### Expected Results
That the menu starts closed when `open={undefined}`

### Actual Results
The menu is open

### Minimal Reproduction of the Problem
Couldn't seem to get the codepen to work.

### Other Information (e.g. stacktraces, related issues, suggestions how to fix)
I can see the default open state is being set in DateTime#getInitialState to `open: !props.input`, which does not consider the `open` prop. I would expect the default open state to just be `open: props.open`

Contributor guide

Open the contributing guide

Research direction

Start by locating DateTime#getInitialState and inspect how the open prop is handled when input is omitted and open is undefined. Reproduce the case in Safari 17.5, then verify that the datetime menu remains closed in that configuration and that existing behavior is preserved.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, react
Domain
frontend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.