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

KeepOpen option doesn't seem to work #2404

Closed
nickalbrecht opened this issue Sep 15, 2021 · 5 comments
Closed

KeepOpen option doesn't seem to work #2404

nickalbrecht opened this issue Sep 15, 2021 · 5 comments

Comments

@nickalbrecht
Copy link

Trying to configure the datetime picker control to close as soon as a date is selected. Attempted to set keepOpen: false instead of the default true, as the documentation states, but it doesn't seem to be working.

https://stackblitz.com/edit/js-bej9yc?file=index.js

@Eonasdan Eonasdan added Type: Bug State: planned This ticket is planned to be worked on. v6 labels Oct 6, 2021
Eonasdan added a commit that referenced this issue Oct 7, 2021
@Eonasdan
Copy link
Owner

Eonasdan commented Oct 7, 2021

Hello. Please try your config with this stackblitz. I believe I've fixed this in the v6-next branch, which I'll publish soon.

@Eonasdan Eonasdan added State: Waiting feedback and removed State: planned This ticket is planned to be worked on. labels Oct 7, 2021
@nickalbrecht
Copy link
Author

Doesn't seem to work yet? The option I need to specify in order to get the picker to close immediately after picking a date is { display: { keepOpen: false }}, correct?

@Eonasdan
Copy link
Owner

Eonasdan commented Oct 9, 2021

That option only works that way if there's no time to select. If you use display: { components: { clock: false } } should work as you expect.

@nickalbrecht
Copy link
Author

nickalbrecht commented Oct 12, 2021

Ahh, gotcha. Can confirm this works. Would be worth adding a note to the documentation, that the option has no effect when the date picker allows time selection (which is the default configuration). So the minimum settings required to get keepOpen: false to work would be display: { keepOpen: false, components: { clock: false }}

@Eonasdan
Copy link
Owner

Going to reopen this to remind myself to update the docs.

@Eonasdan Eonasdan reopened this Oct 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants