Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Datetime auto-opening on Webkit/Safari #870

Open
albatross36 opened this issue Jun 26, 2024 · 1 comment
Open

Datetime auto-opening on Webkit/Safari #870

albatross36 opened this issue Jun 26, 2024 · 1 comment

Comments

@albatross36
Copy link

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 <Datetime/> 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

@noxxxxxxxx
Copy link

noxxxxxxxx commented Sep 5, 2024

@albatross36 Perhaps you might consider trying out my refactored version; the API remains essentially the same

npm i rc-calendar-picker

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants